Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Indexing Q-A in workspace for RAG #582

Open
nkay28 opened this issue Oct 3, 2024 · 3 comments
Open

Indexing Q-A in workspace for RAG #582

nkay28 opened this issue Oct 3, 2024 · 3 comments
Labels

Comments

@nkay28
Copy link

nkay28 commented Oct 3, 2024

Hi,
What is the best way/format to index a set of Questions and Answers into a workspace?
Also, can we add Q-A data into the same workspace alongside a set of PDFs? Or is it recommended to add them in separate workspaces only?
I tried together, and the RAG doesn't seem to pick up Q-A content while chatting. So, I'm trying to figure out if my indexing is correct or not.
Thank you.

@charles-marion
Copy link
Collaborator

Hi @nkay28 ,

Also, can we add Q-A data into the same workspace alongside a set of PDFs? Or is it recommended to add them in separate workspaces only?

I would say it depends on the use case.

It is possible to add Q-As and PDFs but the workspace query will only return the chunks of text relevant to the query and re-ranked by the Cross encoder model (only 3 results are added to the context) .

I would recommend to see what are the documents retuned (In the playground, the cog can be used to show the metadata). Alternatively, you can also use the semantic search page to test.

Q-A content
Is it a fixed list of questions? It is it, it might be an example you would like to send as part of the prompt every time?

If yes, a possible option is to update the system prompt and list them there so they are always sent as example?
https://github.com/aws-samples/aws-genai-llm-chatbot/blob/main/lib/model-interfaces/langchain/functions/request-handler/adapters/bedrock/base.py#L53

Note if you follow this path, there is a pending change refactoring this part: #576

@nkay28
Copy link
Author

nkay28 commented Oct 25, 2024

Hi @charles-marion ,

That's very insightful. Only top 3 would definitely cause a limitation with a heterogenous mix of docs and Q-A, esp. on data with noise.

Yes, I will run some tests after looking into the ranking workflow. It was pulling up only the questions (and no answers) when I tested out via the Sematic search for some reason.

Good point, though I would be concerned with token limitations on the private instance route and token costs overall with that approach. Unless I'm mistaken in my understanding?

Thanks a lot for your valuable insights and suggestions. Appreciate it!

Copy link

This issue is stale because it has been open for 60 days with no activity.

@github-actions github-actions bot added the stale label Dec 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
Development

No branches or pull requests

2 participants