Find answers from the community

Updated 2 months ago

Retrieve

can you help on this?
L
l
8 comments
Can you give more of an example of what you mean?
For example, in the insurance domain if i ask
How much is the deductible?

My document text might not have the word deductible but a near similar word is there

Now the RAG might not get me the right chunks because embedding is not perfect match.

For the insurance domain if i want to have context document which has all the terminology.

How can i use that for efficient RAG
I think you'd probably want a step to rewrite the query using the llm directly
Plain Text
resp = llm.complete("You have access to a database of tax information. Rewrite the following user query to improve search results.\nQuery: ...\nRewritten Query: "
Something like that, might take some prompt engineering
yeah i did this, but here I need to do RAG twice first on context doc, then rephrase with llm, then one more RAG on target doc, LLM call again.

It becomes super slow doing all this online

I was more looking towards offline solution
I don't think there's really an offline solution here. Maybe fine-tuning embeddings? Or adding metadata to your documents to help with embeddings or filtering?
Add a reply
Sign up and join the conversation on Discord