Skip to content

phidatahq/personalized-agentic-rag

Repository files navigation

Personalized Agentic RAG

This repo contains the code for running the Personalized Agentic RAG in dev and prd:

  1. dev: A development environment running locally on docker
  2. prd: A production environment running on AWS ECS

Setup Workspace

  1. Clone the git repo

from the agentic-rag dir:

  1. Create + activate a virtual env:
python3 -m venv aienv
source aienv/bin/activate
  1. Install phidata:
pip install 'phidata[aws]'
  1. Setup workspace:
phi ws setup
  1. Copy workspace/example_secrets to workspace/secrets:
cp -r workspace/example_secrets workspace/secrets
  1. Optional: Create .env file:
cp example.env .env

Run Agentic RAG locally

  1. Install docker desktop

  2. Export credentials

We use gpt-4o as the LLM, so export your OpenAI API Key

export OPENAI_API_KEY=sk-***
  • To use Exa for research, export your EXA_API_KEY (get it from here)
export EXA_API_KEY=xxx

OR set them in the .env file

  1. Start the workspace using:
phi ws up
  1. Stop the workspace using:
phi ws down