base on Text analytics for LLM apps. Cluster messages to detect use cases, outliers, power users. Detect intents and run evals with LLM (OpenAI, MistralAI, Ollama, etc.) # The LLM app backoffice for busy builders
<div align="center">
<img src="./platform/public/image/phospho-banner.png" alt="phospho logo">
<a href="https://www.npmjs.com/package/phospho"><img src="https://img.shields.io/npm/v/phospho?style=flat-square&label=npm+phospho" alt="phospho npm package"></a>
<a href="https://pypi.python.org/pypi/phospho"><img src="https://img.shields.io/pypi/v/phospho?style=flat-square&label=pypi+phospho" alt="phospho Python package on PyPi"></a>
<a href="https://www.ycombinator.com/companies/phospho"><img src="https://img.shields.io/badge/Y%20Combinator-W24-orange?style=flat-square" alt="Y Combinator W24"></a>
<a href="https://pypi.org/project/phospho/" target="_blank"><img src="https://img.shields.io/pypi/dm/phospho"></a>
</div>
🧪 **phospho** is the **backoffice for your LLM app.**
Detect issues and extract insights from your users' text messages.
Gather feedback and measure success. Create the best conversational experience for your users.
Analyze logs effortlessly and finally make sense of all your data.
Learn more in the [documentation](https://docs.phospho.ai/welcome).
<div align="center">
<img src="./clustering-demo.gif" alt="phospho platform">
</div>
## Demo 🧪
https://github.com/phospho-app/phospho/assets/66426745/5422d3b5-4f78-4445-be72-ff51eba26efb
## Key Features 🚀
- **Clustering**: Group similar conversations and identify patterns
- **A/B Testing**: Compare different versions of your LLM app
- **Data Labeling**: Efficiently categorize and annotate your data
- **User Analytics**: Gain insights into user behavior and preferences
- **Integration**: Sync data with LangSmith/Langfuse, Argilla, PowerBI
- **Data Visualization**: Powerful tools to understand your data
- **Multi-user Experience**: Collaborate with your team seamlessly
## Quick start: How to setup phospho SaaS?
Quickly import, analyze and label data on the [phospho platform](https://phospho.ai).
1. Create an [account](https://phospho.ai)
2. Install our SDK:
- Python: `pip install phospho`
- JavaScript: `npm i phospho`
3. Set environment variables ( you can find these on your phospho account )
- `PHOSPHO_API_KEY`
- `PHOSPHO_PROJECT_ID`
4. Initialize phospho: `phospho.init()`
5. Start logging to phospho with `phospho.log(input="question", output="answer")`
[Follow this guide to get started.](https://docs.phospho.ai/getting-started)
**Note:**
- You can also import data directly through a CSV or Excel directly on the platform
- If you use the python version, you might want to disable auto-logging with `phospho.init(auto_log=False)`
## Deploy with docker compose
Create a `.env.docker` using [this guide](./DeploymentGuide.md). Then, run:
```bash
docker compose up
```
Go to `localhost:3000` to see the platform frontend. The backend documentation is available at `localhost:8000/v3/docs`.
## Development guide
### Contributing
We welcome contributions from the community. Please refer to our [contributing guidelines](./CONTRIBUTE.md) for more information.
### Running locally
This project uses Python3.11+ and [NextJS](https://nextjs.org/docs).
To work on it locally,
1. Make sure you have properly added `.env` files in `ai-hub`, `extractor`, `backend`, `platform`.
2. Install the [Temporal CLI](https://temporal.io/setup/install-temporal-cli) `brew install temporal`
3. Create a python virtual environment.
```bash
python -m venv .venv
source .venv/bin/activate
```
4. Then, the quickest way to get started is to use the makefile to install and up.
```bash
# Install dependencies
make install
# Launch everything
make up
```
5. Go to `localhost:3000` to see the platform frontend. The backend documentations are available at `localhost:8000/api/docs`, `localhost:8000/v2/docs` and `localhost:8000/v3/docs`.
6. To stop everything, run:
```bash
make stop
```
## Related projects
- [AI chat bubble with Mistral](https://github.com/phospho-app/ai-chat-bubble) - custom AI assistant connected to your knowledge
- [chatbot template streamlit OpenAI](https://github.com/phospho-app/template-chatbot-streamlit-openai)
- [phospho Javascript client](https://github.com/phospho-app/phosphojs)
- [phospho UI React components for user feedback](https://github.com/phospho-app/phospho-ui-react)
## License
This project is licensed under the Apache 2.0 License - see the [LICENSE file](./LICENCE) for details
## About us
We are a team of passionate AI builders, feel free to reach out [here](mailto:
[email protected]?subject=Hey%20baguettes). _With love and baguettes from Paris, the phospho team 🥖💚_
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=phospho-app/phospho&type=Date)](https://star-history.com/#phospho-app/phospho&Date)
", Assign "at most 3 tags" to the expected json: {"id":"8554","tags":[]} "only from the tags list I provide: [{"id":77,"name":"3d"},{"id":89,"name":"agent"},{"id":17,"name":"ai"},{"id":54,"name":"algorithm"},{"id":24,"name":"api"},{"id":44,"name":"authentication"},{"id":3,"name":"aws"},{"id":27,"name":"backend"},{"id":60,"name":"benchmark"},{"id":72,"name":"best-practices"},{"id":39,"name":"bitcoin"},{"id":37,"name":"blockchain"},{"id":1,"name":"blog"},{"id":45,"name":"bundler"},{"id":58,"name":"cache"},{"id":21,"name":"chat"},{"id":49,"name":"cicd"},{"id":4,"name":"cli"},{"id":64,"name":"cloud-native"},{"id":48,"name":"cms"},{"id":61,"name":"compiler"},{"id":68,"name":"containerization"},{"id":92,"name":"crm"},{"id":34,"name":"data"},{"id":47,"name":"database"},{"id":8,"name":"declarative-gui "},{"id":9,"name":"deploy-tool"},{"id":53,"name":"desktop-app"},{"id":6,"name":"dev-exp-lib"},{"id":59,"name":"dev-tool"},{"id":13,"name":"ecommerce"},{"id":26,"name":"editor"},{"id":66,"name":"emulator"},{"id":62,"name":"filesystem"},{"id":80,"name":"finance"},{"id":15,"name":"firmware"},{"id":73,"name":"for-fun"},{"id":2,"name":"framework"},{"id":11,"name":"frontend"},{"id":22,"name":"game"},{"id":81,"name":"game-engine "},{"id":23,"name":"graphql"},{"id":84,"name":"gui"},{"id":91,"name":"http"},{"id":5,"name":"http-client"},{"id":51,"name":"iac"},{"id":30,"name":"ide"},{"id":78,"name":"iot"},{"id":40,"name":"json"},{"id":83,"name":"julian"},{"id":38,"name":"k8s"},{"id":31,"name":"language"},{"id":10,"name":"learning-resource"},{"id":33,"name":"lib"},{"id":41,"name":"linter"},{"id":28,"name":"lms"},{"id":16,"name":"logging"},{"id":76,"name":"low-code"},{"id":90,"name":"message-queue"},{"id":42,"name":"mobile-app"},{"id":18,"name":"monitoring"},{"id":36,"name":"networking"},{"id":7,"name":"node-version"},{"id":55,"name":"nosql"},{"id":57,"name":"observability"},{"id":46,"name":"orm"},{"id":52,"name":"os"},{"id":14,"name":"parser"},{"id":74,"name":"react"},{"id":82,"name":"real-time"},{"id":56,"name":"robot"},{"id":65,"name":"runtime"},{"id":32,"name":"sdk"},{"id":71,"name":"search"},{"id":63,"name":"secrets"},{"id":25,"name":"security"},{"id":85,"name":"server"},{"id":86,"name":"serverless"},{"id":70,"name":"storage"},{"id":75,"name":"system-design"},{"id":79,"name":"terminal"},{"id":29,"name":"testing"},{"id":12,"name":"ui"},{"id":50,"name":"ux"},{"id":88,"name":"video"},{"id":20,"name":"web-app"},{"id":35,"name":"web-server"},{"id":43,"name":"webassembly"},{"id":69,"name":"workflow"},{"id":87,"name":"yaml"}]" returns me the "expected json"