ThoughtSculpt is a powerful application that leverages large language models (LLMs) to iteratively refine and improve solutions to complex tasks. It combines techniques like Monte Carlo Tree Search (MCTS) and reinforcement learning to explore the solution space and converge on optimal solutions.
- Task Description and Initial Solution: Provide a detailed description of the task you want to solve and an initial solution to start the iterative refinement process.
- Thought Evaluation: Leverage LLMs to evaluate the current solution and provide feedback on its strengths and weaknesses.
- Solution Generation: Based on the feedback, generate multiple candidate solutions using LLMs.
- Decision Simulation: Use MCTS to simulate the decision process and select the most promising candidate solution for further refinement.
- Iterative Refinement: Repeat the evaluation, generation, and simulation steps to iteratively refine the solution until a satisfactory result is achieved.
- API and CLI: Interact with ThoughtSculpt through a RESTful API or a command-line interface (CLI).
- Extensible Architecture: Easily integrate with different LLM providers (e.g., OpenAI, Anthropic, Groq) and customize the behavior according to your needs.
- Clone the repository:
git clone https://github.com/your-username/thoughtsculpt.git
- Install the required dependencies:
cd thoughtsculpt
pip install -r requirements.txt
- Set up the environment variables:
cp .env.example .env
Edit the .env
file and provide your API keys and other configuration settings.
- Initialize the database:
python thoughtsculpt/scripts/initialize_db.py
- Start the FastAPI server:
python -m uvicorn thoughtsculpt.api:app --reload
- Use tools like Postman or curl to interact with the API endpoints:
POST /api/thoughtsculpt
: Sculpt a thought by providing a task description and initial solution.POST /api/evaluate
: Evaluate a solution and get feedback.POST /api/generate
: Generate candidate solutions based on feedback.
Use the command-line interface to sculpt thoughts:
python -m thoughtsculpt.cli.main sculpt --task-description "Your task description" --initial-solution "Your initial solution"
Contributions are welcome! Please follow the standard GitHub workflow:
- Fork the repository
- Create a new branch for your feature or bug fix
- Commit your changes
- Push to the branch
- Create a pull request
This project is licensed under the MIT License.