Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿง  Multi-Agent Debate for Improving Factuality and Reasoning in Language Models ๐Ÿค–

Welcome to the Multi-Agent Debate for AI project! In this repository, I explore an innovative approach to improving the factuality and reasoning capabilities of AI agents by engaging them in debates, where they critique and refine each otherโ€™s answers. It's like a math quiz ๐Ÿงฎ where five AI students (agents) debate their solutions to come up with the most accurate response.

๐Ÿ“œ Paper Summary

This project builds on the concepts introduced in the paper "Improving Factuality and Reasoning in Language Models through Multiagent Debate":

In a Nutshell:

  • ๐Ÿง‘โ€๐Ÿซ Multiple AI Agents Debate: Several AI agents participate in structured debates.
  • ๐Ÿค“ Collaborative Reasoning: Agents critique, refine, and defend their answers, much like a group discussion.
  • โœ… Better Accuracy: The collective reasoning helps catch mistakes and refine responses, leading to more accurate and reliable answers.

๐Ÿ“š Takeaways:

  • Just like teamwork makes complex problems easier for humans, multiple AI agents debating with each other leads to superior results.
  • These debates help improve accuracy and reduce biases by leveraging multiple perspectives.
  • Perfect for fields like healthcare, legal research, and scientific analysis where accuracy is crucial.

๐Ÿ’ป My Project Setup: A Creative Take on AI Debates ๐ŸŽจ

Objective:

I designed a math quiz ๐Ÿงฎ experiment where five AI agents answer questions and engage in debates. Each round brings new critiques and solutions until a winner is declared based on accuracy. The goal? To demonstrate how AI agents improve through peer learning and collaboration.

Technical Setup:

  • Model: WizardMath-7B-v1.1 from Hugging Face, fine-tuned for math reasoning.
  • Quantization: To make it resource-efficient, I used 4-bit quantization via BitsAndBytesConfig, optimizing the model to run smoothly even on smaller GPUs.
  • Dataset: I used the GSM8K dataset, a collection of math word problems, shuffled to randomly select questions for each round.

๐Ÿ“Š Visualizing the Debate

Here are some of the key visualizations from the experiment:

  • Final Rankings ๐Ÿฅ‡
  • Performance Over Rounds: Watch how each agent's performance fluctuated in the line graph, showing their journey through five rounds of debate.
  • Agent Performance in Each Round: Check out the histogram that compares how each agent scored in individual rounds, showcasing the variance in their responses.

๐ŸŽ‰ Conclusion

This project is a fun and creative exploration of AI learning through debate! The idea of multiple agents "arguing" over math problems and improving their answers feels like a glimpse into the future of AI collaboration. Hope you enjoy the project as much as I did building it!

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages