TnsAI

RAG

Retrieval-Augmented Generation — from knowledge base setup to production pipelines.

Where RAG lives in the framework

RAG is intentionally split across three modules so each layer can evolve independently:

LayerModuleProvides
Primitivestnsai-core (com.tnsai.knowledge, com.tnsai.memory.advanced)KnowledgeBase, Document, EmbeddingFunction, BM25Index, VectorMemoryStore, HybridMemoryRetriever
Strategiestnsai-intelligence (com.tnsai.intelligence.rag)RAGPipeline, RAGStrategy (Vector, Keyword, Hybrid), RetrievedDocument, RAGContext
Service / HTTPtnsai-server (com.tnsai.server.rag)RagService, FileIndexer, CodeChunker, HybridRetriever, retrieval streams

If you are building an embedded agent, you typically use Core primitives + Intelligence strategies. If you are running TnsAI.Server, you also get the Service layer with HTTP endpoints, indexing, and stream-based retrieval.

Pages

  • Knowledge Base — Create, populate, query a KnowledgeBase.
  • Strategies — Swap retrieval algorithms via the RAG SPI.
  • Pipeline — Chunk storage, embedding, hybrid search, production deployment.

On this page