Conversation
14 tasks
… README Agent-Logs-Url: https://github.com/dgenio/ChainWeaver/sessions/b76f6f0e-8ca2-495f-9b88-723c1af5f44a Co-authored-by: dgenio <12731907+dgenio@users.noreply.github.com>
Agent-Logs-Url: https://github.com/dgenio/ChainWeaver/sessions/b76f6f0e-8ca2-495f-9b88-723c1af5f44a Co-authored-by: dgenio <12731907+dgenio@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add real-world examples for MCP-like and data pipeline scenarios
Add real-world examples: data pipeline, MCP search, and naive vs compiled comparison
Apr 12, 2026
There was a problem hiding this comment.
Pull request overview
Adds multiple runnable, real-world-focused example scripts to demonstrate ChainWeaver’s deterministic execution benefits (including a latency/cost comparison), and updates the README to reference them.
Changes:
- Added three new example scripts: ETL-style data flow, MCP-style search flow, and naive-vs-compiled timing comparison.
- Updated README Quick Start and Development sections to list all available examples and how to run them.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 9 comments.
| File | Description |
|---|---|
| README.md | Lists additional example scripts in Quick Start and Development sections. |
| examples/data_pipeline_flow.py | New 5-step ETL-style deterministic flow example over mock inventory data. |
| examples/mcp_search_flow.py | New 3-step MCP-style search → extract → format deterministic flow example. |
| examples/naive_vs_compiled.py | New timing comparison example contrasting simulated naive LLM step transitions vs FlowExecutor execution. |
…ck in examples - Replace all 'chain'/'pipeline' terminology in examples and README with canonical 'flow' vocabulary per AGENTS.md domain vocabulary rules - Rename examples/data_pipeline_flow.py -> examples/etl_flow.py; rename internal identifiers pipeline_flow -> etl_flow and flow name 'data_pipeline' -> 'data_etl' to eliminate vocabulary violations - Fix total_hits bug in mcp_search_flow.py: compute total match count before applying top_k slice so downstream steps see true hit count - Add result.success / execution_log check in naive_vs_compiled.py run_compiled() using real ExecutionResult API; surface failing step name and error before output comparison on flow failure - Update README Development section: bare 'pytest' -> 'python -m pytest tests/ -v' to match authoritative validation commands in AGENTS.md
…mples - etl_flow.py: module docstring 'Data pipeline flow' -> 'ETL flow' - naive_vs_compiled.py: '# Number of pipeline steps' -> '# Number of flow steps' - mcp_search_flow.py: mock-data body 'tool-chain execution' -> 'flow execution' All per AGENTS.md domain vocabulary: 'flow' is canonical; 'chain' and 'pipeline' are explicitly forbidden synonyms.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repo had only one trivial arithmetic example, leaving users without concrete evidence of real-world applicability or the latency/cost argument for adopting ChainWeaver.
New examples
examples/etl_flow.py— 5-step ETL flow (fetch_data → validate_records → normalize_fields → enrich_records → store_records) over an inventory mock dataset. Demonstrates field normalization, type coercion, and invalid-record dropping.examples/mcp_search_flow.py— MCP-style retrieval flow (search_knowledge_base → extract_relevant_fields → format_response) over a mock knowledge base. Illustrates how ChainWeaver eliminates intermediate LLM calls from fully deterministic search/extract/format patterns.examples/naive_vs_compiled.py— Side-by-side timing comparison of a 5-step record-enrichment flow. The naive path insertstime.sleep(0.3)between each step (simulated LLM round-trips); the compiled path runs the same flow via a registeredFlow. Prints a table:README
Updated Quick Start and Development sections to list all four examples with one-line descriptions.
Notes
examples/data_pipeline_flow.py; the file was delivered asexamples/etl_flow.py— a more descriptive name that avoids the forbidden "pipeline" vocabulary.TestToolZeroDivisionError::test_zero_division_error_wrapped) is not introduced by this PR. Tracked in Fix TestToolZeroDivisionError assertion to match wrapped executor error message #120.