Example Dags¶
Every operator, decorator and integration has a runnable Dag under example_dags, listed here by operator. Guides embed the Dags they walk through; the rest link to source.
For what to build rather than how, start at What you can build.
Single-prompt tasks¶
Guide |
What it shows |
|---|---|
Summarize and extract entities, grade incident severity, and triage a queue of support tickets one mapped task at a time (example_llm.py, example_llm_classification.py, example_llm_analysis_pipeline.py). |
|
Let the model pick which downstream task runs, and route a failed task to rerun, page or ignore with a confidence bar. |
|
|
|
Compare two schemas and block a load when they drifted. |
|
|
Batch processing¶
Guide |
What it shows |
|---|---|
Classify thousands of reviews at half the price through one OpenAI or Anthropic batch job, with structured output and results landed on object storage (example_llm_batch.py). |
Agents & tools¶
Guide |
What it shows |
|---|---|
|
|
Loading |
|
Connecting an agent to an MCP server through an Airflow connection. |
|
Adding a human-in-the-loop review gate to agent output. |
|
A LangChain ReAct agent that decides its own tool calls, composed with |
Retrieval & document processing¶
Guide |
What it shows |
|---|---|
Parsing PDF, DOCX, CSV, and JSON into |
|
Calling |
|
|
|
|
By use case¶
Dags written around a job. Each has a page under What you can build with the Dag embedded and steps to run it.
Use case |
Source |
|---|---|
example_llamaindex_rag.py: a weekly indexing Dag plus an on-demand query Dag, with single-Dag and multi-source variants. |
|
example_llamaindex_10k.py and example_langchain_10k.py: live SEC EDGAR filings, per-company retrieval fan-out, human review at both ends. One variant per RAG library. |
|
example_llm_survey_analysis.py: download, schema check, generated SQL, email; plus an interactive variant with HITL. example_llm_survey_agentic.py fans a multi-dimensional question out one SQL query per dimension. |
|
example_sandbox_toolset.py: an agent with a read-only warehouse toolset and a sandbox for the arithmetic. |
|
example_aip_progress_tracker.py: the same report built as a deterministic pipeline with a hallucination check and as one autonomous agent. |
|
example_langchain_tool_agent.py: a LangChain ReAct agent between a question-review gate and a report-approval gate. |
Reliability¶
Guide |
What it shows |
|---|---|
Classifying task failures with an LLM into categories you define, then deriving retry, fail, or delay from the category; and the same on a classifier model with a confidence bar. Source: example_llm_retry_policy.py. |
|
Failing over to another vendor inside one task attempt, and drilling the chain without waiting for an outage. Source: example_llm_fallback.py. |
|
Routing a failure with a model that answers typed questions instead of writing text, and escalating when its confidence is low. Source: example_classifier_model.py. |