Closed
Conversation
…rdrails, RAG music search, and risk tool
|
Hello, thank you for your contribution. If you are a participant, please close this pull request and open it in your own forked repository instead of here. Please read the instructions on your onboarding Assignment Submission Guide more carefully. If you are not a participant, please give us up to 72 hours to review your PR. Alternatively, you can reach out to us directly to expedite the review process. |
Author
|
I opened this PR by mistake. I should open it on my repo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
Implemente a modular conversational AI system supporting: API-based animal and horoscope tools, semantic music review search, and a custom risk calculator. Update the project structure and guardrails, integrate ChromaDB for local music embeddings, and improved environment variable handling.
What did you learn from the changes you have made?
I learned how to structure a conversational system using LangGraph, apply guardrails before LLM execution, integrate external tools safely, and implement retrieval-augmented generation with a vector database. I also reinforced best practices for Python packaging and environment configuration.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
Initially, I considered using a Dockerized ChromaDB together with PostgreSQL to store and retrieve music review embeddings dynamically. However, this approach proved complex for local development, so I switched to a simpler setup where ChromaDB persists locally in assignment_chat/chroma_db, making it easier to build and query the database without relying on live containers.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Loading environment variables correctly for API keys and LangSmith. Fixed by using load_dotenv() for both .env and .secrets.
ChromaDB queries failing if containers were not running. Resolved by switching to a persistent local ChromaDB.
Guardrails enforcement needed careful handling to block forbidden topics and prompt injections.
How were these changes tested?
Tested locally by running python -m assignment_chat.app with the Gradio chat interface, invoking all tools (animals, horoscope, music, risk calculator), and verifying that guardrails blocked restricted inputs
A reference to a related issue in your repository (if applicable)
No open issue; this PR implements all assignment requirements for Assignment 2.
Checklist