RAG (Retrieval Augmented Generation)

Retrieval Augmented Generation is a core functionality that allows your digital twin to search through your uploaded documents and incorporate relevant content into conversations. This technology ensures your digital twin can reference trusted materials you control, providing more accurate and contextual responses. RAG activates automatically when you:
  • Upload files to your private IP Vault
  • Select specific files to include in conversations
  • Ask questions that relate to your uploaded content

File Processing Workflow

Understanding how your files are processed helps you optimize the relevance and accuracy of your digital twin’s responses.
1

Document Chunking and Vector Embedding

When you upload a file, the system breaks it into manageable sections and converts each section into a vector embedding - a numerical representation that captures the semantic meaning of the content.Rag Example Gi
2

Question Analysis

Your questions are also converted into vector embeddings on the backend using the same process. This creates a common format that allows the system to compare your question against all uploaded content sections effectively.
3

Relevance Matching

The system uses the Euclidean k-NN (k-nearest neighbors) algorithm to compare your question’s embedding with file section embeddings. Content sections are ranked by relevance score, indicating how closely they match your question’s intent and context.Rag Knn Example Gi
4

Threshold Configuration

You can adjust the relevance threshold to control which content sections are included in responses:
  • Higher threshold: Stricter selection criteria, only highly relevant content
  • Lower threshold: More inclusive selection, potentially less relevant but broader content coverage

Understanding the k-NN Vector Score

The k-NN Vector Score percentage indicates how closely a file section matches your question:
  • 90-100%: Content that semantically matches your question very closely - the concepts, intent, and context align strongly
  • 70-89%: Content with good conceptual overlap but may address related aspects rather than your exact question
  • 50-69%: Content that provides useful background or tangentially related information
  • Below 50%: Content that has minimal semantic relationship to your query
Administrator Control: You can disable file uploads for users while retaining upload capabilities as an administrator. This allows you to maintain control over the knowledge base while preventing unauthorized content additions.