examples/chains/.
How to run
See also
Runnables
The contract these chains compose.
Structured output
Parsers, fixers, retry strategies.
Parsers examples
OutputFixingParser and RetryParser in action.Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Composing primitives into typed pipelines — pipe, structured extraction, dirty-JSON repair.
examples/chains/.
| Name | Scenario | Source |
|---|---|---|
chains_pipe_operator | Triage incoming support tickets through an embed → categorize → tag pipe. | src |
chains_structured_extraction | Parse a meeting note into a typed Vec<ActionItem { who, what, due }>. | src |
chains_structured_parsing | Repair an LLM reply that’s almost-valid JSON before parsing. | src |
chains_typed_runnable | Custom Runnable<UserQuery, RankedResult> impl — end-to-end type safety with .pipe(). | src |
COGNIS_PROVIDER=ollama COGNIS_OLLAMA_MODEL=llama3.1 \
cargo run -p cognis-examples --example chains_structured_extraction
OutputFixingParser and RetryParser in action.