diff --git a/.gitignore b/.gitignore index a56540f0..9eab2612 100644 --- a/.gitignore +++ b/.gitignore @@ -124,6 +124,7 @@ env.bak/ venv.bak/ docs/* !docs/ai_configuration.md +!docs/ai_answers.md !docs/extract_ai_user_guide.md !docs/github-app-deployment.md !docs/search_ai_mode.md diff --git a/docs/ai_answers.md b/docs/ai_answers.md new file mode 100644 index 00000000..1c7b8350 --- /dev/null +++ b/docs/ai_answers.md @@ -0,0 +1,348 @@ +# AI answers + +`ai.choose`, `ai.score`, `ai.true_false`, and `ai.answers` provide structured +answers to common types of questions about each input record, including +probabilities and confidence where supported. They use +[Typesafe](https://docs.typesafe.ai/introduction) to answer the questions. + +The existing [AI model catalog](ai_configuration.md) supplies +`provider: typesafe`, `protocol: systemone`, and the pinned model `jev-1.13.0` +as defaults. `extract.ai` keeps its current API and behavior. + +## Input and output schema + +Every wrangle takes a nonempty `questions` mapping. Each key is a nonblank +question label, used to construct the default output column names. Each +question requires `instructions`: nonempty text, a JSON object, or a JSON array. +Objects must have string keys, and all supplied values must be JSON-compatible. + +| Wrangle | Criteria | Answer fields and default output columns | +| --- | --- | --- | +| `ai.choose` | A mapping of 1–255 nonblank option labels to descriptions. Descriptions can be nonempty strings, JSON objects, JSON arrays, or `null`. | `choice` → `