Skip to main content

Overview

The Nadoo AI Knowledge Base provides a complete Retrieval-Augmented Generation (RAG) pipeline that connects your documents to your AI agent workflows. Instead of relying solely on what a language model was trained on, you can ground its responses in your own data — company documents, product manuals, research papers, or any text corpus. The pipeline has four stages: Document Processing, Vector Storage, Retrieval, and Integration.

RAG Pipeline

1

Document Processing

Upload files and convert them into searchable chunks.
  1. Upload — Drag and drop files or provide URLs
  2. Parse — Extract text from PDF, DOCX, TXT, Markdown, Excel, and web pages
  3. Chunk — Split documents into overlapping segments (default: 1000 characters with 200-character overlap)
  4. Extract metadata — Capture titles, headings, page numbers, and custom metadata for filtering
2

Vector Storage

Generate embeddings and store them for fast similarity search.
  1. Generate embeddings — Convert each chunk into a vector using a configurable embedding model (OpenAI, HuggingFace, Azure, Bedrock, Google, vLLM, Ollama, Local)
  2. Store in vector database — Persist vectors via pluggable VectorStore (pgvector default, Milvus/Qdrant planned). Distance metrics: cosine, euclidean, dot product
  3. Index — Build HNSW or IVFFlat indexes for approximate nearest neighbor search at scale
3

Retrieval

Find the most relevant chunks for a given query.
  1. Query embedding — Convert the user’s question into a vector using the same embedding model
  2. Similarity search — Find the closest vectors in the index
  3. Rerank — Optionally re-score results with a cross-encoder reranker for higher precision
  4. Context assembly — Combine the top chunks into a context window, respecting token limits
4

Integration

Inject retrieved context into your AI agent’s prompt.
  1. Prompt injection — Insert retrieved chunks into the system prompt or user message
  2. Citation tracking — Record which documents contributed to the response for transparency
  3. Feedback loop — Use user feedback to improve retrieval quality over time

Supported Document Formats

FormatExtensionsNotes
PDF.pdfOCR support for scanned documents
Microsoft Word.docx, .docPreserves heading structure
Plain Text.txtDirect ingestion
Markdown.md, .mdxPreserves heading hierarchy
Excel.xlsx, .xlsEach sheet processed separately
Web PagesURLFetches and parses HTML content

Search Modes

The knowledge base supports three search modes that you can configure per query or per knowledge base.

Configuration

Embedding Model

Choose the embedding model used to generate vectors. The model must be consistent between indexing and querying.
{
  "embedding": {
    "model": "text-embedding-3-small",
    "dimensions": 1536,
    "provider": "openai"
  }
}
Embedding providers include OpenAI, HuggingFace, Local models, Azure OpenAI, AWS Bedrock, Google AI Studio, Google Vertex AI, vLLM, and Ollama. The embedding model is set at the knowledge base level and applies to all documents within it.

Chunking

Control how documents are split into segments.
ParameterDefaultDescription
chunk_size1000Maximum number of characters per chunk
chunk_overlap200Number of overlapping characters between consecutive chunks
separator\n\nPrimary split boundary (falls back to sentence/word boundaries)
{
  "chunking": {
    "chunk_size": 1000,
    "chunk_overlap": 200,
    "separator": "\n\n"
  }
}

Retrieval Settings

Fine-tune how documents are fetched at query time.
ParameterDefaultDescription
top_k5Number of chunks to retrieve
score_threshold0.5Minimum similarity score (0.0 to 1.0)
rerankingfalseEnable cross-encoder reranking for higher precision
rerank_modelModel to use for reranking (e.g., cohere-rerank-v3)
rerank_top_k3Number of chunks to keep after reranking
{
  "retrieval": {
    "top_k": 10,
    "score_threshold": 0.5,
    "reranking": true,
    "rerank_model": "cohere-rerank-v3",
    "rerank_top_k": 3
  }
}

Advanced Features

Contextual Retrieval

Enhance each chunk with a brief AI-generated summary of its context within the full document. This improves retrieval accuracy by embedding each chunk with awareness of its surrounding content.

Knowledge Graphs

Extract entities and relationships from documents to build a knowledge graph. This enables graph-based queries that traverse relationships rather than relying solely on text similarity.

Multi-Hop Reasoning

For complex questions that require information from multiple documents, multi-hop reasoning chains together several retrieval steps:
  1. Retrieve initial context for the question
  2. Identify follow-up sub-questions based on the initial context
  3. Retrieve additional context for each sub-question
  4. Synthesize all retrieved information into a comprehensive answer

Using Knowledge in Workflows

To use a knowledge base in your workflow, add a Search Knowledge Node before the AI Agent Node: The Search Knowledge Node retrieves relevant chunks and passes them to the AI Agent Node as context. You can optionally add a Reranker Node between them for improved precision:

Next Steps