Vector Store
The Vector Store holds your text as embeddings: lists of numbers that capture what a piece of text means. That lets you search by meaning rather than by exact words, so a search for "late payment" can find "overdue invoice". It is what powers retrieval for agents and knowledge bases.
The page subtitle reads "pgvector collections — raw and managed KB". In the sidebar, Vector Store has one item, Collections, and sits below the Convert group.
Key terms
| Term | Meaning |
|---|---|
| Collection | A named set of items that are searched together |
| Item | One piece of text, stored with its embedding and optional metadata (labels such as source or page) |
| Embedding | The list of numbers for a piece of text, made by an embedding model |
| Dimensions | How many numbers each embedding has. Every item in a collection must have the same number, and it must match the model |
| Distance metric | How closeness is measured: Cosine, L2 or Inner Product |
| Score | How close a result is to your query, shown as a percentage |
| Managed KB | A collection that is managed for you: documents are split into chunks and embedded automatically |
Two kinds of collection
| Kind | You provide | Use it when |
|---|---|---|
| Raw Collection | Items and their embeddings (or text to embed) | You control the embedding process |
| Managed KB | Documents. The platform chunks and embeds them | You want documents to be searchable without handling embeddings. It is the same record as a Cortex Knowledge Base, so it appears in both APEX Data > Vector Store and Cortex > Knowledge Bases |
A KB tag on a row marks a managed knowledge base collection.
The collections list
At the top right, New Collection creates a raw collection, and the ▾ beside it lets you choose Raw Collection ("Provide your own embeddings") or Managed KB ("Auto-chunk & embed documents"). A Search collections… box filters by name and description.
Each row shows the collection's name and description, an optional KB tag, its distance metric, its dimensions (such as 384d), its item count and when it was created. With none, the page says "No collections yet. Create one to get started." Click a row to open it. More than 20 collections are split into pages with Prev and Next.
Create a raw collection
Click New Collection.
| Field | Notes |
|---|---|
| Name (required) | For example my-embeddings |
| Description | Optional: "what embeddings does this store?" |
| Dimensions | Must match your embedding model's output size. Presets: 384 (MiniLM / ONNX default), 768 (BERT-base / E5-small), 1024 (E5-large / GTR-T5) and 1536 (OpenAI text-embedding-3-small). Choose Custom… for another size, from 1 to 65,535 |
| Distance Metric | Cosine (best for normalised embeddings, the most common), L2 (good for un-normalised vectors) or Inner Product (use when magnitudes matter) |
Click Create Collection. It opens the new collection.
Create a managed KB
Choose Managed KB from the menu. The window explains that it creates "the same canonical record as Cortex Knowledge Bases".
| Field | Notes |
|---|---|
| Name (required) | For example my-knowledge-base |
| Description | Optional |
| Embedding Model | The model used to embed your documents. The list comes from the platform, and defaults to all-MiniLM-L6-v2 (a local model with 384 dimensions) when none is listed |
| Chunk size | How large each piece of a document is, from 64 to 8192. 512 by default |
| Chunk overlap | How much neighbouring pieces share, so ideas are not cut in half. 64 by default. It must be smaller than the chunk size |
Click Create KB. A message confirms it with its ID.
A collection's page
Click a collection to open it. The header shows its name, description and three badges: its dimensions, its distance metric and its item count. A Collections link goes back. Five tabs follow.
Items
Lists the items, 20 per page, each with its text (click more to read long text), its metadata as small key: value tags and when it was added.
- Filter by content or metadata… narrows the items on the current page.
- Add item opens a form: Content (required, "it will be embedded automatically"), Metadata (JSON object), and an Embedding model. The model list prefers one whose dimensions match the collection. If none match, the form warns you. Click Add item (it reads Embedding… while it works).
- The bin icon deletes an item after a confirmation.
- With none, it says "No items yet — add one above or use Bulk upload."
Search
Type anything into the box and click Search. Your text is embedded for you, using a model with the right dimensions, and the closest items are returned.
| Setting | Options |
|---|---|
| Top K | How many results to return: 5, 10 or 20 |
| Min score | Hide weak matches: Any, 0.5 or 0.7 |
| Model | Shown when more than one model fits |
Each result shows its rank, its score as a percentage (such as 82.4%), its text and its metadata. With no match it says "No results above the score threshold." If no model matches the collection's dimensions, an amber note warns that searching uses the default model and may fail. A message about mismatched dimensions tells you to pick a model that matches.
Bulk upload
Two ways to load many items.
Upload a JSONL file. A JSONL file has one JSON object per line, in this shape:
{"content": "Invoices are due within 30 days.", "metadata": {"source": "policy", "page": 4}}
- Drop a
.jsonlor.ndjsonfile, or click to browse. - The page shows how many items it parsed, such as
Parsed 1,200 items, and notes lines it skipped as invalid. The first three are previewed. - Choose an embedding model, if the list is shown.
- Click Upload N items. Items are embedded in batches of 32 and stored. A progress bar shows
340 / 1,200 processed, with any failures counted. Cancel stops it.
A line is invalid when it is not JSON or has no non-empty content. If nothing valid is found, the page says "No valid lines found" and reminds you to use one content and metadata object per line.
From a catalog table. For large tables, Create embedding job opens a new Vector Embed job for this collection. It runs in the background, handles batching and retries, and keeps a run history. It needs the collection to be opened from a project.
Settings
| Section | What it holds |
|---|---|
| General | Edit the Name and Description, then Save changes. Saved confirms |
| Details | Read-only: Distance metric, Dimensions, Created, the Collection ID (with a copy button) and the Project binding, which is a project or "platform-wide" |
| Danger zone | Delete collection. It asks "Delete collection 'name'?" and warns that it will permanently remove its items. This cannot be undone |
API
Ready-to-copy examples for developers, with this collection's real ID and dimensions filled in. Each has a Copy button.
| Section | Examples |
|---|---|
| API Reference | HTTP and Python for semantic search, and HTTP to add an item. Each is two calls: embed the text, then search or store it |
| How to Consume | Four ways for agents and tools to use the collection: attach the knowledge base to an agent, the built-in kb_query tool, a kb_lookup skill, and a Python notebook call |
All calls need a Bearer token, and embeddings must match the collection's dimensions. The How to Consume examples use the linked knowledge base's ID. A collection that is not linked to a knowledge base shows a note that you need to link it first.
Tips
- Pick the model first. Choose the embedding model, then create the collection with that model's dimensions.
- Use one model per collection. Mixing models gives poor results even when dimensions match.
- Add useful metadata. Source, page and date let you trace a result back to where it came from.
- Prefer a Managed KB for documents. It handles chunking for you.