Build index
Read documents (files or folders) and texts, split them into passages and write a knowledge index, with embeddings when a model connection is given.
Command in the Knowledge Q&A toolkit · id ooa.knowledge/build_index · 13 inputs, 3 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Files | List | No | Files and folders to read (folders with their sub-folders). | |
| Texts | List | No | Texts to add, each a dictionary with source and text (for example from the PDF or OCR toolkit). | |
| Index file | File | No | The index file, e.g. knowledge/policies.json (.json.gz keeps it smaller). | |
| Connection | String | No | A saved model connection for embeddings, e.g. one for text-embedding-3-small; without one the index is searched by words only. | |
| Provider | String | No | Embedding provider, when not using a saved connection. | |
| Model | String | No | Embedding model (the deployment for Azure OpenAI). | |
| API key | Credential | No | API key or access token from the vault (not needed for some self-hosted endpoints). For AWS Bedrock and AWS SageMaker: the AWS secret access key (or ACCESS_KEY_ID:SECRET). For Google Vertex AI: a service-account JSON key or an access token. | |
| Endpoint address | String | No | Endpoint; required for Azure OpenAI, Vertex AI (https://REGION-aiplatform.googleapis.com/v1/projects/PROJECT/locations/REGION) and self-hosted models (for a TGI server, e.g. http://tgi-host:8080/v1). | |
| Chunk size | Number | No | 1000 | Passage length in characters. |
| Overlap | Number | No | 150 | Characters each passage shares with the one before, so no sentence is cut off from its context. |
| Hide personal data | Boolean | No | false | Mask emails, phone and card numbers before they are sent for embedding (search by those then works by words only). |
| Knowledge base | String | No | A knowledge base kept in One CommandCenter (AI > Knowledge bases), by name; in Studio without One CommandCenter, knowledge-bases/<name>.json.gz in the work folder. | |
| Urls | List | No | Web pages to read (https:// addresses of intranet or public pages; HTML, text or PDF). |
Outputs
| Output | Type | What it is |
|---|---|---|
| passages | Number | How many passages the index holds. |
| documents | Number | How many documents were read. |
| skipped | List | Files that could not be read, with the reason. |