Skip to content

Added Langchain_With_Gemini_And_Build_RAG #686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

SonjeVilas
Copy link

This PR adds a notebook demonstrating a RAG pipeline using LangChain and Google Gemini, featuring:

  • Document ingestion (PDFs/text) with text splitting.
  • Gemini embeddings (models/embedding-001) and ChromaDB vector storage.
  • Context-aware Q&A with Gemini.
  • Error handling for API/model setup.

Impact: Enables building AI-powered Q&A systems from custom documents.

Dependencies: langchain-google-genai, chromadb, pypdf

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@github-actions github-actions bot added status:awaiting review PR awaiting review from a maintainer component:examples Issues/PR referencing examples folder labels Apr 8, 2025
Copy link
Collaborator

Giom-V commented Apr 23, 2025

Hello @SonjeVilas, thanks for the submission. I've reviewed the notebook and have a few comments:

  • Outdated SDK: This notebook utilizes the older Gemini SDK. To align with current best practices, it should be updated to use the Google Gen AI SDK.
  • Redundancy: The functionality overlaps significantly with the existing notebook Gemini_LangChain_QA_Chroma_WebLoad.ipynb. Any new notebook should either provide a unique value proposition (e.g., using novel techniques or datasets) or significantly improve upon existing examples.
  • Lack of Contextual Explanation: Compared to the other notebook, this submission doesn't adequately explain the core concepts of RAG, LangChain, and Chroma, or what their values are. Our cookbook examples should not just be code snippets but comprehensive guides that teach users about these tools and how they work with Gemini. This is a major area for improvement.

To summarize, the main issue is the level of redundancy and a lack of a narrative explaining the "why" of each step, not just the "how".

@Giom-V Giom-V self-assigned this Apr 23, 2025
@Giom-V
Copy link
Collaborator

Giom-V commented Apr 23, 2025

Sorry, there seem to be a problem with ReviewNB who does not want to post my comments but here are the main ones:

  • for each image/pdf, you need to tell where they come from and what's their license. They need to be available for anyone who wants to run the colab.
  • all part, but especially the last section needs a lot more explanations
  • the code sometimes needs some better formatting (check the advices in the template notebook), and all in all seems artificially complicated. I'm sure a lot of it could be removed, like the to_markdown function that is never used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:examples Issues/PR referencing examples folder status:awaiting review PR awaiting review from a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants