Skip to main content

Documentation Index

Fetch the complete documentation index at: https://cognis.vasanth.xyz/llms.txt

Use this file to discover all available pages before exploring further.

Chain examples cover composition: piping primitives into typed pipelines, extracting structured data from prose, and recovering when an LLM emits dirty JSON. Sources under examples/chains/.
NameScenarioSource
chains_pipe_operatorTriage incoming support tickets through an embed → categorize → tag pipe.src
chains_structured_extractionParse a meeting note into a typed Vec<ActionItem { who, what, due }>.src
chains_structured_parsingRepair an LLM reply that’s almost-valid JSON before parsing.src
chains_typed_runnableCustom Runnable<UserQuery, RankedResult> impl — end-to-end type safety with .pipe().src

How to run

COGNIS_PROVIDER=ollama COGNIS_OLLAMA_MODEL=llama3.1 \
  cargo run -p cognis-examples --example chains_structured_extraction

See also

Runnables

The contract these chains compose.

Structured output

Parsers, fixers, retry strategies.

Parsers examples

OutputFixingParser and RetryParser in action.