Skip to content

Tutorial: pipeline with promptnode - maximum QA database size? #5971

Discussion options

You must be logged in to vote

@wolfgangihloff You're right. The length of the input passed to the PromptNode is limited by the maximum token length of the model. That could be 32768 tokens with gpt-4-32k but in the example it's 4097 with text-davinci-003.

The way to make use of larger knowledge base is to use a retriever that selects the most relevant documents (or pages of your pdf if it is very long) and passes only those most relevant ones to the PromptNode. It is called retrieval augmented generative pipelines: RAG and the retriever is part of the tutorial that you linked. What's maybe unclear after just reading the tutorial is that long pdfs with potentially thousands of pages are preprocessed earlier and split i…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wolfgangihloff
Comment options

Answer selected by wolfgangihloff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants