The alpha testing program is now open to the public! We’d love to hear your feedback.Join!

Grey

Knowledge bases

Create knowledge bases, pick an embedding model and ingestion preset, tune how sources are chunked, and browse the chunks they hold.

Basics

Creating a knowledge base

To create a knowledge base, go to Knowledge Bases → All Knowledge Bases and choose Create knowledge base. The button appears only if you have the Manage knowledge bases permission, which Owners, Admins and Managers have.

  • Icon and Name: how the knowledge base appears in lists. The name is required.
  • Description: optional, what goes in it.
  • Ingestion preset: required. It sets how sources are read, chunked and enriched.
  • Embedding connection: required. A model provider connection that can create embeddings. Grey selects the first one, with its first suggested model.
  • Embedding model: the model that turns chunks and questions into vectors. When the model can embed images too, the field says image sources get visual search.
  • Dimensions: the size of the model's vectors. Choose Detect to read it from the model, or let Grey detect it when you create the knowledge base. Models that support a choice are asked for 1024.

The embedding model and its dimensions are locked once the knowledge base exists. To use a different model, create a new knowledge base and add its sources again.

If no connection can create embeddings yet, the dialog links to Model Providers instead. The Pipelines and model providers guide covers adding one.

Concepts

Knowledge bases, sources and chunks

A knowledge base is a collection of sources: documents, web pages, notes, images, audio and video. When you add a source, Grey runs an ingestion job that reads it, splits it into chunks and embeds each chunk with the knowledge base's embedding model. Pipelines search those chunks to answer questions.

How a source is read and split comes from the knowledge base's ingestion settings: its preset, plus any changes you saved on top of it. Each job keeps a copy of the settings it ran with, so changing them later doesn't touch sources that are already ingested until you re-ingest them.

A knowledge base is either Active or Archived. Pipelines search only active knowledge bases, so archiving one takes it out of every answer without deleting anything.

Knowledge Bases

The knowledge base list

All Knowledge Bases lists every knowledge base in the project. The figures across the top count the Knowledge bases (and how many are active), the Sources and Chunks across all of them, and the Presets you can choose from, system and custom.

Each row shows the knowledge base's source and chunk counts, preset, embedding model, status and when it was last updated. Filter by status (All statuses, Active or Archived), or search by name and description.

Click a row to open the knowledge base. Each row's ⋯ menu has Open, plus Archive or Restore if you can manage knowledge bases. The list shows 25 knowledge bases a page; switch to 10, 50 or 100 at the bottom.

Knowledge Bases

Knowledge base details

Opening a knowledge base shows its name, status and description, with its sections listed beside it:

  • Sources: the knowledge base's sources, with the same filters, actions and Upload button as the Sources screen, limited to this knowledge base. See Sources and ingestion.
  • Chunks: the chunks its sources were split into.
  • Ingestion settings: its embedding connection, preset and settings.
  • Activity: its ingestion jobs, newest first, with each job's source, stage, progress, status, estimated and actual cost, and when it was created.
  • Danger zone: archive or delete it.

The open knowledge base and section are part of the page address, so refreshing or sharing the link opens the same place. Choose All Knowledge Bases at the top to go back to the list.

Knowledge Bases

Browsing chunks

The Chunks section of a knowledge base lists the chunks its sources were split into. Each one shows where it came from (a page number, or a time range for audio and video), its size in tokens, the trail of headings above it and the first lines of its text.

Only chunks from finished ingestion jobs appear. While a source is re-ingested, its previous chunks stay in place until the new ones are ready. The list shows 25 chunks a page; switch to 10, 50 or 100 at the bottom.

Knowledge Bases

Embedding model and connection

The Embeddings card at the top of a knowledge base's Ingestion settings shows what embeds its chunks and the questions asked of it.

  • Connection: you can move the knowledge base to another connection that uses the same embedding format, for example after replacing an API key. Grey won't save a connection with a different format.
  • Model: locked when the knowledge base was created.
  • Dimensions: locked once detected. If a knowledge base has none yet, choose Detect; they lock when you save.

After you change the connection, choose Save on the card. Changing it needs the Manage knowledge bases permission.

Vector search uses an index for 256, 384, 512, 768, 1024, 1536, 2048 and 3072 dimensions. Other sizes are searched without one, which is fine for small and medium knowledge bases but slower on very large ones.

Knowledge Bases

Changing ingestion settings

A knowledge base's Ingestion settings section decides how its sources are processed. Pick a preset from the cards, each showing its price per page, then adjust the settings below them. Picking a preset replaces the settings with that preset's own.

Choose Save to keep your changes. Saved settings apply to sources ingested from then on, and sources already in the knowledge base keep the settings they were ingested with. To apply the settings to everything, choose Re-ingest all, which queues a new ingestion job for every source in the knowledge base.

Save needs the Manage knowledge bases permission and Re-ingest all needs Run ingestion jobs. Without them the buttons are disabled, and hovering over one says why. The ingestion settings reference describes each setting.

Reference

Ingestion settings reference

Knowledge bases and presets share these settings. Everything except Parser and OCR sits under Advanced. Defaults in parentheses are the Balanced preset's, which a new custom preset also starts from.

  • Parser and OCR: Grey currently reads every document's text, whatever these are set to. Pages with no text layer, such as scanned pages, are skipped.
  • Strategy (Recursive): Recursive splits at headings, then fills each chunk up to the chunk size. Fixed size cuts the whole document into equal windows. Page makes one chunk per page. Semantic runs as Recursive.
  • Chunk size (tokens) (512): from 64 to 4,096, in steps of 32.
  • Overlap (tokens) (64): from 0 to 1,024, in steps of 16, and never more than half the chunk size.
  • Atomic tables (on): keeps each table in one chunk unless it's more than twice the chunk size.
  • Heading breadcrumbs (on): starts each chunk with its trail of section headings.
  • Contextual enrichment (off): adds a model-written summary of the surrounding text to each chunk, using the processing model in Settings → General.
  • Transcribe (on): transcribes audio and video. With it off, audio and video sources can't be ingested. Diarize (on) splits the transcript by speaker.
  • Extract entities and relations (on): adds the knowledge base to the project's knowledge graph, using the processing model.

Parent-child chunking and Keyframes can't be turned on.

Ingestion Presets

Ingestion presets

An ingestion preset is a saved set of ingestion settings with its prices. Knowledge Bases → Ingestion Presets lists two kinds:

  • System presets are built in and read-only: Fast ($0.002 a page, without graph extraction or speaker splitting), Balanced ($0.006 a page, with both), High accuracy ($0.02 a page, adds contextual enrichment) and Auto (shown as $0.002 to $0.02 a page).
  • Custom presets are your project's own. Choose New preset, or Duplicate on a system preset to start from a copy of it.

The preset editor has a Name (required), a Description, the ingestion settings and, under Advanced → Pricing, prices per page, per media minute, per keyframe minute and per million graph or contextual tokens. Its Cost preview estimates 100 pages and an hour of media at those prices. The prices feed the cost estimate shown when you add sources. While Grey reads documents as text, it records each page at no more than the Fast price.

Each custom preset's ⋯ menu has Edit, Duplicate and Delete. Grey asks you to confirm a delete, which can't be undone, and knowledge bases using the preset keep their current settings. Managing presets needs the Manage ingestion presets permission.

Knowledge Bases

Archiving and deleting

The Danger zone section of a knowledge base has Archive (or Restore) and Delete. Both need the Manage knowledge bases permission.

  • Archive takes the knowledge base out of every pipeline's searches without deleting its sources or chunks. It happens straight away, and Restore makes it active again. The list's ⋯ menu has the same two actions.
  • Delete asks you to confirm first. Its sources and chunks can no longer be retrieved, and a deleted knowledge base can't be restored from Grey.

Troubleshooting

Detect can't read the model's dimensions

When Grey can't detect an embedding model's dimensions, the knowledge base isn't created and a message says why. The usual causes and fixes:

  • The provider rejected the API key: update the connection's key in Pipelines → Model Providers.
  • The provider doesn't serve that model: check the name in Embedding model.
  • The connection can't create embeddings for that model: choose another connection or model.
  • The model's vectors are outside the supported range of 64 to 4,000 dimensions: choose another model.
  • The provider is rate limiting requests, timed out or is unavailable: wait a moment, then choose Detect again.