Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add a LlamaIndex-based RAG agent #62

Merged
merged 1 commit into from
May 20, 2024
Merged

Conversation

zzfoo
Copy link
Contributor

@zzfoo zzfoo commented May 16, 2024

Changes

  • Added RAGAgent class in rag_agent.py.
  • Created RAGAgent.json for agent configuration.
  • Added paul_graham_essay.txt from which our agent will retrive context for answering.
  • Registered RAGAgent in agent_factory.py.
  • Added new dependencies to requirements.txt.
  • Added chroma_db to .ignore to ignore generated vector database data.

Related Issue

This PR addresses issue #61.

Output of running agent

$ ./scripts/run/ollama_llama3.sh

[馃ollama/llama3] AIOS LLM successfully loaded.

[RAGAgent] Initialized.

[RAGAgent] How did the author balance his writing, technology projects, and responsibilities at Y Combinator?

[馃ollama/llama3] RAGAgent is switched to executing.

[RAGAgent] Final result is: The author, being a founder of Y Combinator and a writer, found it challenging to balance his responsibilities at YC with his writing projects and personal pursuits. Initially, he had planned to
dedicate only a third of his attention to YC, but as the organization grew, so did his involvement.

To manage his time effectively, the author prioritized his work at YC, which involved selecting and helping founders, over his writing projects. Although writing was an important aspect of his life, it took a backseat when
YC's needs became more pressing.

The author also found himself working on internal software for YC using Arc, but he eventually stopped developing the language as it became less attractive to him. This reduced his personal projects from three (writing essays, hack, and work on YC) to two: writing essays and working on YC.

Despite the demands of running a startup accelerator, the author found that working at YC was engaging and varied due to the diverse problems faced by each new batch of startups. While there were aspects he didn't enjoy, such as disputes between cofounders or dealing with untruthful founders, he worked hard to resolve these issues.

The author's experience also taught him the importance of setting a good example for his team at YC. He believed that if he, as the boss, worked very hard, it would motivate others to do the same. This mindset influenced his decision-making and contributed to the success of YC.

In hindsight, Robert Morris' unsolicited advice, "Make sure Y Combinator isn't the last cool thing you do," resonated with the author. It was a gentle nudge to consider other pursuits beyond YC, which ultimately helped him
reevaluate his priorities and make decisions about his future.

Copy link
Collaborator

@dongyuanjushi dongyuanjushi left a comment

Choose a reason for hiding this comment

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

Cool! Could you also provide the result of using pipreqs to check whether the requirements.txt contains redundant packages?

@dongyuanjushi dongyuanjushi added the add feature New feature or request label May 18, 2024
@zzfoo
Copy link
Contributor Author

zzfoo commented May 20, 2024

Cool! Could you also provide the result of using pipreqs to check whether the requirements.txt contains redundant packages?

These packages are added manually and they're necessary for the RAGAgent to work. I also tried to check the dependencies using pipreqs, but it didn't give a proper result since the agent modules weren't used by the scripts in the root directory.

image

@zzfoo
Copy link
Contributor Author

zzfoo commented May 20, 2024

These two packages are dependencies of chromadb, and they were added here to lock its version, because using older versions causes an error.

image

Copy link
Collaborator

@dongyuanjushi dongyuanjushi left a comment

Choose a reason for hiding this comment

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

Got you, great job! It has been merged.

@dongyuanjushi dongyuanjushi merged commit bbdf6b9 into agiresearch:main May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
add feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants