This hack explores:
- Populating vertices and edges in a Graph database from an event source
- Using that Graph to power a more personalised LLM assistant, using Microsoft Agent Framework
- Extracting preferences from the user chat and persisting them back to the graph for future usage.
It makes use of the anonymised H&M dataset, available on Kaggle.
-
user_agent:- Looks up user purchses from the graph
- Recommends items based on customer segment queries
- Finds similar items to existing ones
- Calls preference extraction as an agent inside a memory layer
-
dynamic_query_agent:- Experiment to test handing the agent the graph schema and a user query, and dynamically generating a gremlin query. Not safe, there be dragons here :)
-
signals_extraction_agent:- Pass the conversation to this agent along with a model schema for
preferences, and have it extract those customer preferences from the chat.
- Pass the conversation to this agent along with a model schema for
In the super handy Dev UI extension for Agent Framework:
├── infra/ # Terraform infrastructure definitions
├── src/
│ ├── agents/ # Agents, tools & memory
│ └── ingestion/ # Data pipeline
│ ├── ingest/ # CSV → Event Hub producer
│ ├── consume/ # Event Hub consumer → Cosmos DB
│ └── models/ # Event data models
└── tests/ # Unit, integration and ai evals
-
Clone the repository
git clone https://github.com/damoodamoo/graph_chat.git cd graph_chat -
Open in dev container
- Open the project in VS Code
- When prompted, click "Reopen in Container"
- Or use Command Palette:
Dev Containers: Reopen in Container
-
Authenticate with Azure
az login
-
Configure environment variables
- Create a
.envfile in the project root:
cp .env.sample .env - Create a
-
Deploy infrastructure
task infra:deploy
Deploying the infra creates the
app.envfile that the ingestion and chat agents need. -
Download and reduce the source data from Kaggle
-
Get your Kaggle API key and set it in .env
-
Download the dataset
task data:download
Now you have the full (and reduced) dataset downloaded.
-
-
Run the 'ingest' and 'consume' flows to populate the graph. In one terminal session, start the consumer...
task consume:all
...and in another session, start the ingest (producer):
task ingest:all
-
Run the agent
task agent:dev...ask it some stuff.
-
Run the evals Currently there is an initial set of evals for preference extraction.
task evalOther unit / integration tests are run via
task test.
This is an experimental project and is intended for upskilling.


