Find answers from the community

Updated 5 months ago

Retireve

Hello there, I have a vanilla rag & reranker pipeline set up. my rag application is suppose to retrieve all line items from an invoice with an unknown number of line items. Could range from 1 line item to tens or hundreds of line items.

In my prompt, I have explicitly stated to retrieve all line items from my index, however, at all times the retrieval is always incomplete. Suppose the retrieval fits into the LLM response context window, what can I do to ensure it always return to me all line items in my index?
L
g
12 comments
The prompt doesn't really have anything to do with how much is retrieved in a vanilla setup

If the top k is 3, it's always retrieving 3 chunks no matter the prompt
So in a way if i want more chunks to return, I just have to increase the top k
Are chunks the same as nodes?
Yea chunks are the same as nodes πŸ‘
Asking for "all line items" though, you won't really know what to set the top k as unless you know how many line items there are

It's really more of a sql query at that point
im doing extraction from unstructured document so I can only experiment and set a higher top k based on page number
im running my pipeline on 8 page document and all pages contain tables. each table consisting of around 2 to 7 line items (which could be different if the document comes from another source)
with a top k of 15, sometimes it just doesn't return everything i asked for
hey @Logan M just wanna do a quick check. I also have a FlagEmbeddingRanker with a top_n=2 included in my query engine. It does also affect the number of chunks returned in a query right?
Yes that will rerank and return the top 2
Hi @Logan M I'm still having trouble with my application. I have created a question issue in the LlamaIndex github repo with sample docs and reproducible codes. Can you or perhaps anybody in your team help me out? https://github.com/run-llama/llama_index/issues/15075
Thanks and appreciate your reply
Add a reply
Sign up and join the conversation on Discord