Skip to content

Reorganize the codebase #77

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

Merged
merged 4 commits into from
Mar 14, 2025
Merged

Reorganize the codebase #77

merged 4 commits into from
Mar 14, 2025

Conversation

GFJHogue
Copy link
Collaborator

@GFJHogue GFJHogue commented Feb 26, 2025

This PR tackles some badly needed improvements to our code organization in src/ ahead of incoming new data-source integrations (#78).


Where have things moved?

  • code related to the core chatbot workflow is moved to src/agent/
  • top-level chat workflow graph creation has been split out from src/agent/graph.py into src/agent/profiles, in order to support Chainlit instances with different/multiple chat profiles.
  • simple (single-file) agent steps should live under /src/agent/tasks/
  • code related to "embeddings" data bundle generation is moved to src/data_generation and organized by data provider (reactome, uniprot, etc.)
  • the Tavily external search code has been moved under src/tools/external_search
  • complex agent steps (multiple files) should live under src/tools/

What has been refactored?

For legacy reasons, the code that originally returned the Reactome RAG retriever evolved into returning the main chat graph. Furthermore it's also been responsible for creating the LLM and Embeddings instances. For the purpose of developing a robust agent workflow graph with potentially multiple retrievers, this is incorrect.

The constructor of AgentGraph going forward will start by getting its required "foundational" models (LLM, Embeddings), before initializing all other runnables (retrievers, tasks, tools, etc) that depend on those models.

What is new?

Added full chat profiles support on both the Chainlit and LangGraph layers, with enabled profiles set in config.yml.
(React-to-Me is the only available profile until the new cross-db profile is integrated).


Although infeasible to guarantee, this PR is intended to not change any of the effective logic of the current chatbot (verified as best as I can in my own local testing).

@GFJHogue GFJHogue self-assigned this Feb 26, 2025
@GFJHogue GFJHogue mentioned this pull request Mar 12, 2025
@GFJHogue GFJHogue marked this pull request as ready for review March 12, 2025 19:21
@adamjohnwright adamjohnwright merged commit 4bdc9df into main Mar 14, 2025
8 checks passed
@adamjohnwright adamjohnwright deleted the refactor-codebase branch March 14, 2025 17:33
GFJHogue pushed a commit that referenced this pull request Apr 17, 2025
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.

2 participants