LLPhant
The PHP framework for generative AI
Fabrizio Balliano
Let's talk AI in PHP...
at a PHP conference...
so let's start with...
Python!
meme from "IT Crowd"
you HAVE to watch it!
no but seriously
* mandatory meme of every talk ever ;-)
Here comes the
LLPhant
by Maxime Thoonsen @ Theodo
MIT licensed
�inspired by LangChain/LLamaIndex
Why do we need a framework...
...when we have PHP clients for LLM platforms?�
let's see what this fuzz is about
1. LLPhant is multi vendor
Supporting OpenAI, Anthropic, Mistral, Ollama,�and all services compatible with the OpenAI API such as LocalAI
2. LLPhant is feature rich
3. LLPhant is extremely easy
4. Chat
5. Tools: probably the most important thing
6. Embedding
The right definition:� embeddings are vectors stored in an index within a vector database*
The wrong (but also kinda right) definition:� Add "stuff" to an LLM
* https://pub.aimind.so/llm-embeddings-explained-simply-f7536d3d0e4b
The magic of vectorialization
man is to king as woman is to queen
king - man = queen - woman Warsaw - Poland = Rome - Italy
6. Embedding (process overview)
6. Embedding (how to)
6. Embedding (supported VectorStores)
Embedding vs Tools
7. AutoPHP: a simple agentic approach
Demo time!
Questions & Feedback