Runnable, small-scale COSMO-style pipeline demo.
This project shows end-to-end flow from behavior data to recommendation using an LLM generation stage, filtering, critic scoring, KG construction, and serving.
For full technical design, workflow, tradeoffs, and COSMO-vs-demo gap, see ARCHITECTURE.md.
uv run python main.py demo --query "shoes for pregnant women" --top 5 --output artifactsThis executes the full pipeline and writes outputs to artifacts.
Build artifacts only:
uv run python main.py build --output artifactsServe recommendations from built artifacts:
uv run python main.py recommend "how to decorate a home" --top 3 --output artifactsJSON output:
uv run python main.py demo --query "shoes for pregnant women" --top 2 --output artifacts --jsonscripted(default, deterministic)azure-entra(Azure OpenAI with Microsoft Entra ID)openai(OpenAI-compatible API key flow)
- Copy
.env.templateto.envand fill in values. - Run
az login. - Run:
uv run python main.py demo --llm azure-entra --query "shoes for pregnant women" --top 5 --output artifacts$env:OPENAI_API_KEY="..."
uv run python main.py demo --llm openai --query "shoes for pregnant women" --top 5 --output artifactsAll credentials and endpoints can be set in .env or your environment. See .env.template.
- artifacts/summary/run_summary.json
- artifacts/knowledge/knowledge_graph.json
- artifacts/serving/recommendations.json
For stage-by-stage behavior, tradeoffs, and detailed examples, see ARCHITECTURE.md.