Ask
Answer a question from a knowledge index: the best passages go to the model, which answers from them only and cites them.
Command in the Knowledge Q&A toolkit · id ooa.knowledge/ask · 13 inputs (1 required), 5 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Index file | File | No | The index file, e.g. knowledge/policies.json (.json.gz keeps it smaller). | |
| Question | String | Yes | The question. | |
| Top k | Number | No | 5 | How many passages the model gets. |
| Connection | String | No | Name of a Model Connection (provider, model and key managed in one place). Leave empty to set them on this action. | |
| Provider | String | No | openai | Who runs the model: OpenAI, Azure OpenAI, Anthropic, OpenAI-compatible (LiteLLM, vLLM, Ollama), Hugging Face (its router or your own TGI server), AWS SageMaker (a model on an Amazon SageMaker endpoint), AWS Bedrock or Google Vertex AI (Gemini). |
| Model | String | No | Model name; the deployment name for Azure OpenAI; the endpoint name for AWS SageMaker; the model or inference profile id for AWS Bedrock. | |
| 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). | |
| Embedding connection | String | No | The embedding connection, when not the one the index was built with. | |
| Maximum tokens | Number | No | 1024 | Maximum answer length in tokens. |
| Hide personal data | Boolean | No | true | Replace emails, phone and card numbers, IBANs and similar before sending; restored in the answer. |
| Timeout (seconds) | Number | No | 0 | Seconds to wait for the model; 180 when 0. |
| 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. |
Outputs
| Output | Type | What it is |
|---|---|---|
| answer | String | The answer, citing passages like [1]. |
| sources | List | The passages given to the model: n, source, passage, score, text. |
| found | Boolean | False when no passage matched, so the model was not asked. |
| input_tokens | Number | Tokens in the request. |
| output_tokens | Number | Tokens in the answer. |