Skip to content

docs: Rock paper scissors LLM example#170

Merged
toby-coleman merged 6 commits intomainfrom
docs/event-based-llm
Nov 6, 2025
Merged

docs: Rock paper scissors LLM example#170
toby-coleman merged 6 commits intomainfrom
docs/event-based-llm

Conversation

@toby-coleman
Copy link
Contributor

@toby-coleman toby-coleman commented Nov 1, 2025

Summary

Adds a new demo to the documentation. Two LLMs play a game of rock, paper, scissors against each other, with Plugboard components used to determine the winner at the end of each round.

Demonstrates advanced usage of the LLMChat component, along with circular model structures.

Changes

  • Adds rock paper scissors notebook.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @toby-coleman, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a new, interactive demonstration to the documentation that features two large language models (LLMs) engaging in a game of Rock Paper Scissors. The primary goal is to showcase advanced capabilities of the Plugboard framework, specifically how to orchestrate complex, multi-LLM interactions and implement game logic using custom components and circular data flows. This example provides a practical illustration of building sophisticated AI-driven applications.

Highlights

  • New LLM Demo: A new 'Rock Paper Scissors' demo has been added to the documentation, showcasing two LLMs playing against each other.
  • Advanced LLM Usage: The demo illustrates advanced usage of the LLM component, including the creation of circular model structures within the Plugboard framework.
  • Plugboard Components: Custom Plugboard components like RoundIterator, Judge, and PromptBuilder are used to manage game rounds, determine winners, and feed dynamic prompts to the LLMs.
  • Multi-LLM Integration: The example features integration of two different LLM providers, OpenAI (using gpt-5-mini) and Gemini (using gemini-2.5-flash), to demonstrate interoperability.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Benchmark comparison for 79419bc7 (base) vs e10db6ab (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests -----------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.12-64bit/0001_pr)         443.9104 (1.0)      451.3369 (1.0)      447.5378 (1.0)      3.2149 (1.0)      447.8909 (1.0)      5.7522 (1.0)           2;0  2.2344 (1.0)           5           1
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.12-64bit/0001_base)     445.1750 (1.00)     456.8005 (1.01)     449.8443 (1.01)     4.4724 (1.39)     448.3903 (1.00)     5.7830 (1.01)          2;0  2.2230 (0.99)          5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request adds a new demo notebook showcasing a rock-paper-scissors game between two LLMs. The changes are well-structured and provide a good example of advanced plugboard usage. My review includes a few suggestions to improve the code quality within the new notebook, focusing on fixing a typo in the documentation, refactoring duplicated code for better maintainability, and simplifying game logic for improved readability.

@codecov
Copy link

codecov bot commented Nov 1, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Benchmark comparison for 79419bc7 (base) vs fb1a207f (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests -----------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.12-64bit/0001_pr)         439.7220 (1.0)      448.1388 (1.0)      443.4076 (1.0)      3.3721 (1.54)     443.5755 (1.0)      5.2420 (2.06)          2;0  2.2553 (1.0)           5           1
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.12-64bit/0001_base)     446.8477 (1.02)     452.7642 (1.01)     449.5269 (1.01)     2.1848 (1.0)      449.8024 (1.01)     2.5456 (1.0)           2;0  2.2246 (0.99)          5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@github-actions
Copy link

github-actions bot commented Nov 1, 2025

Benchmark comparison for 79419bc7 (base) vs 56e4e8c3 (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests ------------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median                IQR            Outliers     OPS            Rounds  Iterations
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.12-64bit/0001_pr)         433.2147 (1.0)      450.7246 (1.00)     439.3562 (1.0)      7.2224 (2.46)     436.1957 (1.0)      10.1449 (3.03)          1;0  2.2761 (1.0)           5           1
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.12-64bit/0001_base)     442.9846 (1.02)     449.9158 (1.0)      447.9744 (1.02)     2.9370 (1.0)      449.5209 (1.03)      3.3473 (1.0)           1;0  2.2323 (0.98)          5           1
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@github-actions
Copy link

github-actions bot commented Nov 6, 2025

Benchmark comparison for 1e9767b0 (base) vs b3b35f42 (PR)


------------------------------------------------------------------------------------------------------------------ benchmark: 2 tests -----------------------------------------------------------------------------------------------------------------
Name (time in ms)                                                                         Min                 Max                Mean            StdDev              Median               IQR            Outliers     OPS            Rounds  Iterations
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
test_benchmark_process_run (pr/.benchmarks/Linux-CPython-3.12-64bit/0001_pr)         447.7045 (1.0)      464.5019 (1.01)     453.1517 (1.0)      6.6380 (1.71)     451.9082 (1.0)      6.6537 (1.35)          1;0  2.2068 (1.0)           5           1
test_benchmark_process_run (main/.benchmarks/Linux-CPython-3.12-64bit/0001_base)     451.5253 (1.01)     461.5899 (1.0)      455.3960 (1.00)     3.8860 (1.0)      454.7065 (1.01)     4.9455 (1.0)           1;0  2.1959 (1.00)          5           1
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Legend:
  Outliers: 1 Standard Deviation from Mean; 1.5 IQR (InterQuartile Range) from 1st Quartile and 3rd Quartile.
  OPS: Operations Per Second, computed as 1 / Mean

@toby-coleman toby-coleman merged commit 9414e5c into main Nov 6, 2025
28 of 30 checks passed
@toby-coleman toby-coleman deleted the docs/event-based-llm branch November 6, 2025 19:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant