Docs/Knowledge Base

Core Concepts

Knowledge Base

Ground your agent in your real data. Talknex uses pgvector RAG to pull relevant context from your documents before every LLM call — eliminating hallucinations.

How RAG works

When the caller says something, the system embeds their utterance using OpenAI's text-embedding-3-small model (1536 dimensions) and performs a cosine similarity search against your org's vector store. The top-K matching chunks are injected into the LLM context before generation.

# Simplified flow

caller utterance → embed (1536-dim) → pgvector cosine search

→ top 3 chunks injected into system prompt

→ GPT-4o generates grounded response

Ingestion sources

File upload

Drag and drop PDFs, DOCX, TXT, or Markdown files. Maximum 50MB per file. Multiple files can be uploaded in bulk. The system parses, chunks, and embeds in background.

PDF · DOCX · TXT · MD · CSV

URL crawl

Provide a root URL and Talknex crawls up to 500 pages. Good for product documentation sites, help centers, and FAQs. Recrawls can be scheduled daily or weekly.

Any publicly accessible URL

API ingestion

POST raw text chunks directly to the Knowledge API. Use this for dynamic content that changes frequently — your backend pushes updates in real-time.

REST API · Webhooks

Chunking strategy

Documents are split into chunks before embedding. The default strategy is semantic chunking (splits at paragraph and sentence boundaries), which produces higher-quality retrieval than fixed-size character splitting.

Max chunk size512 tokens
Overlap64 tokens (ensures context isn't lost at boundaries)
Embedding modeltext-embedding-3-small (1536-dim)
Similarity metricCosine (pgvector)
Top-K results3 chunks per query (configurable 1–8)

Managing collections

Knowledge sources are organized into Collections. Each collection can be attached to one or more agents. A collection can contain mixed sources (files + URLs).

1.Create a collection: Knowledge → New Collection
2.Add sources: drag files or paste a URL
3.Monitor indexing status: green = ready, yellow = processing, red = failed
4.Attach to agent: Agent → Knowledge → Select Collection
5.Force re-index: Collection → Actions → Re-index All

Plan limits

PlanCollectionsDocumentsCrawl pagesRe-index freq
Free11050Manual
ProUnlimited500500Daily
EnterpriseUnlimitedUnlimitedUnlimitedReal-time
Knowledge Base — Talknex Docs