Building production-ready LLM-powered applications is currently very difficult. It involves countless iterations of prompt engineering, parameter tuning, and architectures.
Agenta provides you with the tools to quickly ๐ iterate, ๐งช experiment, and โ๏ธ evaluate your LLM apps. All without imposing any restrictions on your choice of framework, library, or model.
agenta-demo.mp4
Write your LLM-powered application as you would normally do. Feel free to use any framework, library, or model (langchain or llma_index, GPT-4 or Falcon).
Example simple application that generates baby names
from jinja2 import Template
import openai
template = Template(prompt_template)
prompt = template.render(country=country, gender=gender)
openai.api_key = os.environ.get("OPENAI_API_KEY") # make sure to set this manually!
chat_completion = openai.ChatCompletion.create(
model="gpt-3.5-turbo", messages=[{"role": "user", "content": prompt}])
print(chat_completion.choices[0].message.content)
With two lines of code, specify the inputs and parameters for your experiment.
import agenta as ag
default_prompt = "Give me five cool names for a baby from {{country}} with this gender {{gender}}!!!!"
@ag.post
def generate(country: str, gender: str, temperature: ag.FloatParam = 0.9, prompt_template: ag.TextParam = default_prompt) -> str:
# rest of the code
Now your team can ๐ iterate, ๐งช experiment, and โ๏ธ evaluate different versions of your app (with your code!) in the web platform.
![Screenshot 2023-06-25 at 21 08 53](https://private-user-images.githubusercontent.com/57623556/248580912-7e07a988-a36a-4fb5-99dd-9cc13a678434.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQxMzAzODMsIm5iZiI6MTcyNDEzMDA4MywicGF0aCI6Ii81NzYyMzU1Ni8yNDg1ODA5MTItN2UwN2E5ODgtYTM2YS00ZmI1LTk5ZGQtOWNjMTNhNjc4NDM0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjAlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIwVDA1MDEyM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI4MzQyZWU2ZTA3YTg2MGY2NDk5Y2UwOWRkZjViYTBiOThjYTgwZjAyZDRiMWU0ZTJkMDQxZDRlOTRkMGIzN2YmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.fpYavBk0OCR7nfsYdk3SDg6B05r9bXC6HLG2xEH2Jm8)
-
๐ช Playground: With just a few lines of code, define the parameters and prompts you wish to experiment with. You and your team can quickly experiment and fork new versions on the web UI.
-
๐ Version Evaluation: Define test sets, evaluate, and A/B test app versions.
-
๐ API Deployment Made Easy: When you are ready, deploy your LLM applications as APIs in one click.
Please go to docs.agenta.ai for full documentation on:
- ๐จ Build quickly: You need to iterate many times on different architectures and prompts to bring apps to production. We streamline this process and allow you to do this in days instead of weeks.
- ๐๏ธ Build robust apps and reduce hallucination: We provide you with the tools to systematically and easily evaluate your application to make sure you only serve robust apps to production
- ๐จโ๐ป Developer-centric: We cater to complex LLM-apps and pipelines that require more than one simple prompt. We allow you to experiment and iterate on apps that have complex integration, business logic, and many prompts.
- ๐ Solution-Agnostic: You have the freedom to use any library and models, be it Langchain, llma_index, or a custom-written alternative.
- ๐ Privacy-First: We respect your privacy and do not proxy your data through third-party services. The platform and the data are hosted on your infrastructure.
We warmly welcome contributions to Agenta. Feel free to submit issues, fork the repository, and send pull requests.