Icon

KNIME 101 - Live Demo - Simple RAG

Improve your RAG pipeline:

  • Implement topic based document chunking versus the character splitting method

  • Use an LLM component to generate key-word heavy summaries of each document

  • Use an LLM to find the best document for the user question and apply this document ID as a metadata filter in the retriever node.

  • Use an LLM to rewrite the user query to be more inline with the document content.

  • Use an LLM to filter retrieved documents for relevance (latency trade-off here) OR apply a threshold filter based on dissimilarity score (lower is better) to pass the most relevant documents to the model

  • Use a more powerful embedding model such as emb-3-large to better capture semantic relationships

Read in your PDFs
Tika Parser
Split documents
Text Chunker
Assign row IDs to get document ID
RowID
Store embeddings
FAISS Vector Store Creator
Remove 'Row'
String Replacer
Query question in vector store
Vector Store Retriever
Select and load embedding model
GPT4All Embedding Model Selector
Select and configuremodel paramters
Azure OpenAI LLM Selector
Embed documents
Text Embedder
Enter in your API key
Credentials Configuration
Parse out retrieveddocuments
Ungroup
Group retrieved documents to send to LLM
GroupBy
Extract PDF path
String Manipulation
Enter in user question
String Widget
Select your Azureresources
Azure OpenAI Authenticator
Question to variable
Variable to Table Row
Prompt LLM to answer theuser's question usingthe provided information
LLM Prompter
Append the question to the system message (LLM instructions)
String Manipulation
System message to variable
Table Row to Variable

Nodes

Extensions

Links