agiresearch / OpenAGI

OpenAGI: When LLM Meets Domain Experts
MIT License
1.82k stars 151 forks source link

feat: Add a LlamaIndex-based RAG agent #62

Closed zzfoo closed 1 month ago

zzfoo commented 1 month ago

Changes

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.

zzfoo commented 1 month ago

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 commented 1 month ago

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

image