feat: Add a LlamaIndex-based RAG agent #62
Merged
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.
Changes
RAGAgent
class inrag_agent.py
.RAGAgent.json
for agent configuration.paul_graham_essay.txt
from which our agent will retrive context for answering.agent_factory.py
.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.