How yinon-gold/llms-in-wds-modeling works
This repository is a research-oriented assistant for water-distribution modeling: an engineer’s question is answered by retrieving EPyT documentation, generating and reviewing code, then executing it against an EPANET network. The agent, retrieval strategies, model adapter, and execution utilities are supported by sampled source; the README documents the broader capabilities and test workflows. Some prompt/evaluation wiring and the documentation corpus are not present in the supplied excerpts or tree, so those relationships are not inferred.
Main entry points: agent.py EPANET agent · retriever.py Retriever strategies · llm.py Language model adapter · code_execution.py Code execution
Components 18
Agent workflow
- EPANET agent
llm_epanet/models/agent.py - Task prompts
llm_epanet/utils/prompts.py - Agent result models
llm_epanet/utils/data_model.py
Documentation retrieval
- Retriever strategies
llm_epanet/models/retriever.py - BM25 scoring
llm_epanet/models/bm25retriever.py - FAISS index
llm_epanet/models/vdb.py - EPyT documentation
llm_epanet/models/retriever.py
Model and execution
- Language model adapter
llm_epanet/models/llm.py - Code execution
llm_epanet/utils/code_execution.py - API settings
llm_epanet/utils/settings.py
Water modeling
- Water queries
llm_epanet/data/queries.py - EPANET network files
networks
Other components
- Water engineer
- OpenRouter API
- Anthropic API
- Python sandbox
- Embedding providers
- EPyT / EPANET
Connections 17
- Water engineer → EPANET agent: submits question
README.md - EPANET agent → Retriever strategies: retrieves context
llm_epanet/models/agent.py - Retriever strategies → BM25 scoring: uses keyword search
llm_epanet/models/retriever.py - Retriever strategies → FAISS index: loads vector index
llm_epanet/models/retriever.py - Retriever strategies → EPyT documentation: reads documents
llm_epanet/models/retriever.py - EPANET agent → Language model adapter: requests generation
llm_epanet/models/agent.py - EPANET agent → Code execution: runs generated code
llm_epanet/models/agent.py - EPANET agent → Agent result models: returns result
llm_epanet/models/agent.py - Language model adapter → API settings: reads credentials
llm_epanet/models/llm.py - Language model adapter → OpenRouter API: sends completion
llm_epanet/models/llm.py - Language model adapter → Anthropic API: fallback attempt
llm_epanet/models/llm.py - Retriever strategies → Embedding providers: requests embeddings
llm_epanet/models/retriever.py - Code execution → Python sandbox: runs isolated code
llm_epanet/utils/code_execution.py - Code execution → EPyT / EPANET: executes EPyT code
llm_epanet/utils/code_execution.py - Water engineer → EPANET network files: selects network
README.md - EPANET agent → Task prompts: uses task guidance
- Water queries → EPANET network files: names test networks
llm_epanet/data/queries.py