Fragaria: From 'r's in Strawberry to Complex Problem-Solving AI
Mar 19, 2024
·
2 min read
Fragaria is a powerful and flexible Chain of Thought (CoT) reasoning API that leverages various Language Model (LLM) providers and incorporates Reinforcement Learning (RL) techniques to solve complex problems and answer intricate questions. Named after the botanical genus of strawberries, Fragaria pays homage to the famous “How many ‘r’s in strawberry?” problem, symbolizing its ability to tackle both simple and complex queries with equal finesse.
Features
- Multi-Provider Support: Seamlessly switch between OpenAI, Groq, and Together.ai as LLM providers.
- Chain of Thought Reasoning: Employ sophisticated CoT techniques to break down and solve complex problems.
- Reinforcement Learning: Utilize RL algorithms to continuously improve problem-solving strategies and adapt to new challenges.
- Adaptive Learning: Enhance performance over time through a SQLite-based scoring system integrated with RL techniques.
- Configurable: Easy-to-update YAML configuration file for flexible setup of both LLM and RL parameters.
- OpenAPI Documentation: Comprehensive API documentation with Swagger UI and ReDoc.
- CORS Support: Built-in Cross-Origin Resource Sharing for easy integration with web applications.
How It Works
Fragaria employs a sophisticated Chain of Thought (CoT) reasoning process enhanced by Reinforcement Learning:
- Problem Classification: Categorizes the input problem into known or new problem types.
- CoT Path Generation: Creates multiple reasoning approaches for the problem type, influenced by past performance.
- Parallel Execution: Applies each CoT path to the problem concurrently.
- Result Combination: Synthesizes the results from different paths.
- Evaluation: Scores the effectiveness of each approach.
- Reinforcement Learning Update: Uses the evaluation scores as rewards to update the RL policy.
- Adaptive Learning: Updates the scoring database and RL model to improve future performance.
Getting Started
The project is available on GitHub and can be easily set up using Python’s package management tools. Visit the GitHub repository for detailed installation instructions and documentation.