Skip to content

feat: add iGPT as optional email intelligence retriever#4

Open
ShayFeldboy1010 wants to merge 5 commits intokaymen99:mainfrom
ShayFeldboy1010:feature/igpt-integration
Open

feat: add iGPT as optional email intelligence retriever#4
ShayFeldboy1010 wants to merge 5 commits intokaymen99:mainfrom
ShayFeldboy1010:feature/igpt-integration

Conversation

@ShayFeldboy1010
Copy link
Copy Markdown

@ShayFeldboy1010 ShayFeldboy1010 commented Feb 26, 2026

Summary

  • Adds iGPT as an optional alternative to the existing ChromaDB RAG pipeline
  • When USE_IGPT=true, product enquiry emails skip construct_rag_queries and call the iGPT Recall API directly — replacing the entire document loading/chunking/embedding/retrieval chain with a single API call
  • Fully backward-compatible — default behavior is completely unchanged when USE_IGPT is not set

What changed

File Change
src/tools/igpt_retriever.py New module with igpt_retrieve() and igpt_search() functions using the official langchain-igpt SDK
src/nodes.py Conditional routing + retrieval logic based on USE_IGPT env var
src/graph.py Added "product related igpt" route to skip query construction
requirements.txt Added langchain-igpt (optional dep)
README.md Comparison table, flow diagram, setup instructions, links to docs

Why iGPT

This project uses a full RAG stack to answer product enquiries: load docs → chunk → embed → store in ChromaDB → retrieve → generate. iGPT replaces that entire pipeline with one API call against live Gmail/Outlook data — no local vector store, no embedding model, no create_index.py to maintain.

ChromaDB RAG (Default) iGPT
Setup Load docs, chunk, embed, store, create retriever chain Set 3 env vars
Data source Static text files in data/ folder Live Gmail/Outlook inbox (auto-indexed)
Code ~80 lines across create_index.py + agents.py + nodes.py ~10 lines in igpt_retriever.py

Test plan

  • Verify default behavior unchanged: run with USE_IGPT unset, confirm ChromaDB RAG pipeline works as before
  • Verify iGPT path: set USE_IGPT=true + IGPT_API_KEY + IGPT_API_USER, confirm product enquiry emails route through iGPT retrieval
  • Verify non-product emails (complaints, feedback, unrelated) are unaffected by the flag

ShayFeldboy1010 and others added 5 commits February 26, 2026 13:33
Add iGPT (igpt.ai) as an alternative to the ChromaDB RAG pipeline.
When USE_IGPT=true, product enquiry emails skip the construct_rag_queries
step and call the iGPT Recall API directly, replacing the entire
document loading/chunking/embedding/retrieval chain with a single API call.
Fully backward-compatible — default behavior unchanged when USE_IGPT is unset.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace manual requests.post() calls with IgptAsk and IgptSearch from
the langchain-igpt package. This uses iGPT's official LangChain integration
and removes the requests dependency.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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