What's new in Specialist (Oct 21, 2024)
The Specialist component acquires new superpowers: the ability to specify custom input and output ports. As the video explains, it's a pretty cool new trick.
Custom input ports
Now, when you specify mustache-like "{{ params }}
" in either Persona or Task of the Specialist, they will pop up as extra required input ports on the component.
This unlocks the capacity to parametrize (or "templatize") the configuration of the Specialist. For example, as shown in the video, we can move shared or common content out of the Specialist itself. We could also use this to supply generated content: populate parts of the Persona with information, generated with another Specialist, etc.
Custom output ports
Not to be outdone, the custom output ports offer a way to route the flow along the board, enabling the Specialist to act as a decision-maker on what happens next. In the previous world, whatever was wired next was it -- a deterministic flow. Now, with the routes, you can let the Specialist choose the next step. By specifying "{{ routes | out }}
" (note the "| out
", inspired by Liquid), you can create extra outputs on the Specialist -- and let the LLM to plot the course.
Note
Under the hood, each route becomes a function call declaration for an LLM, and, in conjunction of your mentioning it in the Task or Persona, this is enough to spur an LLM to make a function call when asked.
New possibilities
These two features create a whole new level of possibilities. For example, it now takes just one Specialist with routes to create a typical ReAct agent. Here's a Business Researcher, which, given the name of the business, reasons its way through a detailed research using various tools (Google Custom Search, Wikipedia, Get Page as Markdown, and Google Places API), and then produces a detailed report.
Here's another example: the Co-creator. This is a more complete version of the board built in the video above. It features an extra route for restarting the collaboration process, just in case we want a clean slate for the same initial prompt.
We can easily imagine building boards that evaluate and critique, with Specialist making decisions and routing appropriately. We build chat bots that have branches for different kinds of conversations. We can make Specialist parametrize other Specialist and even define their routes. All we need to do is imagine.