Skip to content

Commit

Permalink
docs: add docs for training (crewAIInc#824)
Browse files Browse the repository at this point in the history
  • Loading branch information
pythonbyte authored Jun 27, 2024
1 parent 10997dd commit 2188358
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,47 @@ Please refer to the [Connect crewAI to LLMs](https://docs.crewai.com/how-to/LLM-

**CrewAI's Advantage**: CrewAI is built with production in mind. It offers the flexibility of Autogen's conversational agents and the structured process approach of ChatDev, but without the rigidity. CrewAI's processes are designed to be dynamic and adaptable, fitting seamlessly into both development and production workflows.


## Training

The training feature in CrewAI allows you to train your AI agents using the command-line interface (CLI). By running the command `crewai train -n <n_iterations>`, you can specify the number of iterations for the training process.

During training, CrewAI utilizes techniques to optimize the performance of your agents along with human feedback. This helps the agents improve their understanding, decision-making, and problem-solving abilities.

To use the training feature, follow these steps:

1. Open your terminal or command prompt.
2. Navigate to the directory where your CrewAI project is located.
3. Run the following command:

```shell
crewai train -n <n_iterations>
```

Replace `<n_iterations>` with the desired number of training iterations. This determines how many times the agents will go through the training process.

Remember to also replace the placeholder inputs with the actual values you want to use on the main.py file in the `train` function.

```python
def train():
"""
Train the crew for a given number of iterations.
"""
inputs = {"topic": "AI LLMs"}
try:
ProjectCreationCrew().crew().train(n_iterations=int(sys.argv[1]), inputs=inputs)
...
```

It is important to note that the training process may take some time, depending on the complexity of your agents and will also require your feedback on each iteration.

Once the training is complete, your agents will be equipped with enhanced capabilities and knowledge, ready to tackle complex tasks and provide more consistent and valuable insights.

Remember to regularly update and retrain your agents to ensure they stay up-to-date with the latest information and advancements in the field.

Happy training with CrewAI!


## Contribution

CrewAI is open-source and we welcome contributions. If you're looking to contribute, please:
Expand Down

0 comments on commit 2188358

Please sign in to comment.