Files
audita/examples/README.md

4.9 KiB

Maintained examples

Build Audita from the repository root with Go 1.27 or newer. The commands below assume the executable is on PATH. Each project selects its main file from its own directory, which also determines prompt companions and overlay context. All models, credentials, names, and endpoints are illustrative.

Local processing

From examples/local, edit prompts.yml to match a reachable OpenAI-compatible local service and its model. Then run:

audita config validate --config config.yml --glossary-file glossary.yml
audita preflight --smoke=false --config config.yml --glossary-file glossary.yml --output corrected.json transcript.json
audita process --config config.yml --glossary-file glossary.yml --output corrected.json transcript.json

The local-only preflight checks the intended destination without contacting the model. Omit --smoke=false to run the default live structured-output checks; see PromptKit diagnostics. Processing makes model requests. Reports are written beside the selected output unless disabled. For an offline validator preview, from the same directory:

audita promptkit show prepared audita/validators.meaning_reversal_review \
  --config config.yml --glossary-file glossary.yml --profile local \
  --var "PayloadJSON=$(cat validation-candidate.json)" \
  --var 'TranscriptDescriptionBlock='

To preview the repair instruction and its output schema without inference:

audita promptkit show prepared audita/modules.grammar.repair \
  --config config.yml --glossary-file glossary.yml --profile local \
  --var "RepairRequestJSON=$(cat repair-candidate.json)"

These previews render supplied data without inference. The native command help and CLI reference describe additional inspection and validation.

Service and overlay

From examples/service, edit the synthetic endpoint and models in prompts.yml. Set AUDITA_EXAMPLE_KEY to your service credential before a real request. Inspect without a provider call:

audita config validate --config config.yml --overlay testing
audita promptkit show profile service-test --config config.yml

The example does not promise a provider's model availability, price, or quality.

Runtime glossary input

From examples/service, the runtime-glossary overlay selects a configured reference collection and an incoming collection. The runtime file replaces the incoming entries. Inspect the combined settings:

audita config show --scope app --config config.yml --overlay runtime-glossary \
  --glossary-file runtime-glossary.yml

After configuring the example service and credential, run:

audita process --config config.yml --overlay runtime-glossary \
  --glossary-file runtime-glossary.yml --output corrected.json transcript.json

The runtime file and overlay contain synthetic data.

Edit a prompt and run again

From examples/prompt-edit, inspect the operator replacement:

audita promptkit show prompt audita/modules.grammar.proposal --config config.yml --glossary-file glossary.yml

Edit its message in prompts.yml, repeat the inspection, and run audita process --config config.yml --glossary-file glossary.yml --output corrected.json transcript.json against a configured local service. Its complete replacement also selects a structural-repair budget; see the v4.1 migration guide. Each invocation captures the files anew. For native resource formats and commands, see the PromptKit documentation and ckprompt guide.

Shared glossary library

From examples/campaigns, first.yml and second.yml explicitly select the shared multi-collection file, which imports the synthetic party and spell data. Inspect each configuration:

audita config validate --config first.yml --glossary-file glossary.yml
audita config validate --config second.yml --glossary-file glossary.yml

The equivalent arrangement uses separate complete files:

audita config validate --config first.yml --glossary-file party.yml --glossary-file spells.yml

With a local service configured, process either campaign:

audita process --config first.yml --glossary-file glossary.yml --output first-output.json transcript.json
audita process --config second.yml --glossary-file glossary.yml --output second-output.json transcript.json

Edit prompts.yml for a local service before processing either campaign. The first uses separate party and spell corrections; the second selects only party. The spell input is a shared document and needs no Audita-specific vocabulary copy.