Skip to content

valx76/SymfonyAI-POC

Repository files navigation

SymfonyAI-POC

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.

Stack

  • PHP 8.4
  • Symfony 7.3
  • Symfony AI Bundle
  • ChromaDB (as a vector database)
  • Gemini 2 Flash
  • Docker
  • FrankenPHP

Usage

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.

Tools

PHP-CS-FIXER:
make php-cs-fixer

PHPSTAN / PHPAT (level 10):
make phpstan

Preview

PreviewSymfonyAIPOC.mp4

About

POC - Order system that can be queried using an LLM agent. Secured user data isolation (a user can only get information about his orders).

Topics

Resources

Stars

Watchers

Forks

Contributors