Knowledge base

Embeddings and vector stores

The embedding model decides how Dezifi understands meaning. The vector store decides where indices live and how fast retrieval is. Together they determine retrieval quality and cost.

What you'll learn
  • Which embedding model indexes your documents
  • Where vectors are stored and what is supported today
  • Which knobs change retrieval quality
  • How to evaluate retrieval before going to production

Choosing an embedding model

Embedding models convert text into vectors. In the beta every dataset is embedded with an OpenAI model (the search engine picked at creation names it, text-embedding-3-small by default) on your workspace's OpenAI key, never on Dezifi's. There is no other model to pick, and it cannot be changed after creation.

Vector store

Today every knowledge base is stored in pgvector (PostgreSQL with the vector extension) inside the Dezifi platform. There is no provider to choose per dataset. Other vector stores are not available in the beta.

Retrieval quality knobs

  1. 1

    Chunk size

    Documents are split into chunks of up to about 1,000 characters with 200 overlapping (the default search engine's setting). It cannot be changed per dataset in the dashboard.
  2. 2

    Top-k

    How many chunks the agent pulls per question (Top K Results in the agent builder, 1 to 50). Default is 5. Raise it when answers feel incomplete; lower it when the agent gets distracted by irrelevant context.
  3. 3

    Similarity threshold

    Minimum similarity score a chunk needs, from 0 to 0.90 (default 0.30). Higher means fewer but more relevant chunks; above about 0.6 an agent often finds nothing. Tune in tandem with top-k.
  4. 4

    Max documents

    The most documents one answer may draw on (1 to 20 in the agent builder). Passages from further documents are dropped.

Evaluate before going live

Build a small set of representative questions with expected source documents and run them through Eval. Track retrieval precision and the agent end-to-end answer quality across provider and knob changes. Do not ship a tuning change without measuring it.

Frequently asked questions

Which vector store should I pick?
None to pick: knowledge bases are stored in pgvector inside the platform today.
Can I mix embedding models across datasets?
Not today. Every knowledge base is indexed with the same OpenAI embedding model, so an agent searching several of them embeds its question once, with the OpenAI key of the first knowledge base it searches.
What does it cost?
Embedding is billed per token by OpenAI to the key that indexes the knowledge base: once per chunk when a document is indexed (again on Reindex), plus one small embedding per search. Storage in pgvector is part of the platform. If that key stops working (revoked, out of credit), uploads fail with "Couldn't index: the OpenAI key isn't working" and the workspace's admins are emailed.
How do I know retrieval is good enough?
Run an Eval suite of held-out questions. Aim for top-k precision above 0.8 on representative queries before exposing the agent to end users.