POC of a simulated order system that can be queried using an LLM agent.
It is using the Symfony AI bundle.
The data retrieval is secured using metadata: A user can only access his own orders using the LLM.
This cannot be hacked using some special prompts because the restriction is applied on the vector database directly.
- PHP 8.4
- Symfony 7.3
- Symfony AI Bundle
- ChromaDB (as a vector database)
- Gemini 2 Flash
- Docker
- FrankenPHP
Create a free API key for Google Gemini and put it in the .env file.
Start docker:
docker compose up
Generate the data (migrations, fixtures, embeddings):
make init
Go to https://localhost.
PHP-CS-FIXER:
make php-cs-fixer
PHPSTAN / PHPAT (level 10):
make phpstan