breadboard-ai / breadboard

A library for prototyping generative AI applications.
Apache License 2.0
208 stars 31 forks source link

Build a board generator #2909

Open dglazkov opened 3 months ago

dglazkov commented 3 months ago

Now that we have plenty of boards as examples, let's build a board that generates boards.

dglazkov commented 3 months ago

Here's an example, generated by https://breadboard-ai.web.app/?board=https://breadboard.live/boards/@dimitri/board-describer.bgl.json

Proposal for the Librarian Board

This board, titled "The Librarian," aims to help users find relevant books based on their interests. It utilizes a multi-step process involving an interview, book searches via the Google Books API, and finally, a summarized list of recommendations.

Here's a breakdown of the components and their roles:

1. Input Node (input):

2. Looper Node (looper-b381bf13 - Interview Planner):

3. Specialist Node (specialist-2551887d - Interviewer):

4. Human Node (human-8b77a262 - Asking User):

5. Specialist Node (specialist-27a12855 - Researcher):

6. Specialist Node (specialist-8928cd1a - Summarizer):

7. Output Node (output):

Workflow:

The user provides initial context about the desired book. The looper node then generates interview themes, and the interviewer node poses questions based on these themes. The user responds, and this information, along with the initial context, is used by the researcher node to query the Google Books API. Finally, the summarizer node compiles the results into a user-friendly list of recommendations, which are displayed via the output node.

This board effectively combines human input with AI-powered tools and specialists to provide a personalized book recommendation experience. The use of the looper node allows for a dynamic and iterative interview process, while the integration of the Google Books API ensures a comprehensive search for relevant titles.

dglazkov commented 3 months ago

The few-shot data set: https://docs.google.com/spreadsheets/d/1XDDLa4DTymHb9jc8s78RePviGmE-7gH90KZvyW0w2rA/pubhtml?gid=0&single=true

This was generated using Breadboard:

I mostly hand-crafted the first row, and then fed it as a few-shot example for the next row. Then tweaked the problems I found in generated spec. By row 4, it was getting it perfectly.

Next step: do the inverse. Use the data set as few-shot examples to generate spec from prompt, then BGL from spec.