Knowledge Retrieval
Last updated
Last updated
The knowledge retrieval node is used to store your documents and data for use in workflows, enabling retrieval augmented generation (RAG), semantic search, and document retrieval.
The knowledge retrieval node automates the complexities of setting up a vector database, pre-processing your documents, loading the data into the database, and executing queries to retrieve relevant documents.
Vector Database
Orchestra Enterprise customers are automatically provisioned with a vector database when their organization is created. Each database is isolated to each customer, meaning your data is secure and only you can access the data in your database.
Data Upload
To upload data, select the Knowledge Retrieval Node and click on "+ Add Parameter". This will give you the ability to upload documents. Current supported document types include TXT, PDF, JSON, MD, XLSX, DOCX, and PPTX, with an individual file max size of 15MB.
Data Pre-Processing
Once data has been uploaded, it is processed to be optimally stored in the vector database. The data is parsed, cleaned, chunked, embedded, and indexed.
For TXT and PDF, content is parsed into text segments, or "chunks", and any embedded images undergo object character recognition (OCR) to extract any text.
Deduplication is applied to remove any redundant data for more relevant search.
Documents are chunked.
Text chunks are vectorized using a top MTEB model.
Vectors are indexed using a proprietary vector indexing algorithm.
Data Storage
Data is stored in an index within the vector database.
Once all data is uploaded to the knowledge retrieval node, you specify a prompt which is used to search the database using either vector search, semantic search, or a full text search. The most common approach for setting the search prompt is to dynamically pass a prompt either provided by the user or created earlier in the workflow.
Inference / Data Retrieval
When the knowledge retrieval node is invoked:
The same model used to embed the data in the vector database, embeds the prompt.
Vector Search or Full Text Search is used to retrieve the most relevant documents.
A reranker is used before returning the relevant data to the workflow.
Knowledge Retrieval Node Output
The knowledge retrieval returns the model's response to the prompt based on the documents retrieved from the vector database.