Skip to content

feat: add a runnable local RAG example using CUBRID, Qdrant and Ollama - #554

Open
yeongseon wants to merge 5 commits into
mainfrom
feat/runnable-local-rag-example-20261106
Open

yeongseon wants to merge 5 commits into
mainfrom
feat/runnable-local-rag-example-20261106

Conversation

@yeongseon

Copy link
Copy Markdown
Contributor

Why

The existing templates/ai-agent/03_rag_metadata.py simulates vector references and LLM output. Add a separate real local retrieval-and-generation walkthrough where CUBRID remains the canonical data store.

Changes

  • A localhost-only CUBRID 11.4 / Qdrant / Ollama Compose stack under templates/rag/.
  • Fictional sample data ingestion, actual local embedding and vector search, parameterized CUBRID chunk retrieval, local LLM response, source IDs, and a FastAPI POST /ask.
  • Deterministic offline tests included in make test, and repository index/docs updates.

Verification

  • Required GitHub CI checks on final head
  • Local / CI offline pytest suite
  • Manual three-service end-to-end execution (not run in this session)

Scope and limitations

This is a learning example, not a security-certified public-sector AI product. It has no authentication, per-document authorization, or cross-store atomicity. Only fictional data is included; the disposable lab uses local dba defaults. Docker-based integration with real Qdrant/Ollama and CUBRID 11.2/11.4 is not claimed as verified. No existing AI-agent behavior or protected workflows were modified.

@yeongseon
yeongseon requested a review from paikend as a code owner November 6, 2026 12:28

@yeongseon yeongseon left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the complete 13-file RAG demo diff at c52ef0086d3db995f196c159167c2479246b53b1 and its passing offline CI. Good separation: CUBRID stores source/chunk text, Qdrant holds vectors/IDs, Ollama runs locally; query retrieval uses parameterized CUBRID lookups and the docs correctly warn that cross-store updates are not atomic and there is no authorization. Before calling this 'runnable' and merging, please provide one actual local three-service smoke run: docker compose up, pull both models, python ingest.py, start FastAPI, POST /ask, record a real answer with matching sample:// source IDs, and check rerun ingestion. Right now all added tests use fakes and the PR explicitly marks end-to-end execution unverified; a green CI does not demonstrate CUBRID 11.4/Qdrant 1.15.5/Ollama 0.12.3 interoperability. Small reproducibility fix: the README asks a user to run python -m pytest templates/rag/tests/test_offline.py after creating a fresh venv with only pip install -r requirements.txt, but that file has only fastapi/pycubrid/uvicorn, not pytest. Document optional pip install pytest for that step (rather than making the runtime dependency heavier). Treat this as a local educational demo only, not a public-sector reference architecture or security boundary.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant