Setup Your Development Environment
Follow these steps to set up Persona locally and start building. Clone the repository and install dependencies. Ensure you have Docker and Docker Compose installed on your machine.Configure Environment Variables
Create a.env
file in the root directory based on the provided example:
.env
file to include your specific configurations:
Run the Docker Containers
http://localhost:8000
Neo4j will be available at bolt://localhost:7687
. Neo4j Browser will be available at http://localhost:7474
.
You can change the ports in the docker compose file if you are running other services on your system.
Interact with the API
Persona exposes a set of RESTful APIs to interact with user knowledge graphs. Get started with basic endpoints to create a user, ingest data, and perform RAG queries.Create a New User
Endpoint:Ingest User Data
Ingest API is designed to be used with unstructured data inherently. In the backend Persona uses a combination of LLMs and Graph Schema to construct the user’s graph. So you can ingest data as a string, following any format, and Persona will do its best to understand and store it in the graph. Persona is primarily designed to take in user interaction logs as strings, but can work with conversational data, or any other unstructured data. For now, we will use a simple text input. Endpoint:Perform a RAG Query
Persona can answer questions based on user’s knowledge graph. This is a RAG interface to user’s data. Endpoint:Learn Anything - Ask Anything
Persona can be configured to understand custom attributes of a user for your specific use case. There are two interfaces to interact with the user’s graph. Learn and Ask.Learn Interface
Learn interface gives you a way to instruct Persona on how to construct the graph, and what properties to focus on. Define a schema and Persona will use it for it’s next ingestion cycle. A learning schema consists of:- Name: Identifier for the schema
- Description: Purpose of the schema
- Attributes: Node properties to extract
- Relationships: Edge types to identify