subconsciousnetwork / subconscious

Apache License 2.0
8 stars 0 forks source link

Experiment: score-based classification and routing for prompts #3 #1107

Closed gordonbrander closed 8 months ago

gordonbrander commented 8 months ago

Yet another riff on https://github.com/subconsciousnetwork/subconscious/pull/1104

Design

This PR changes the design by making removing the concept of an orchestrator. Instead, we have

This gives routes a high degree of expressivity, since a route may rewrite the input using information from the classifications, and then recurse back into the router. Routes may also call out to specialized sub-routers, allowing us to construct trees of routing, with each router able to recurse on itself. This is similar in principle to many rule-based NLP systems such as AIML or ChatScript that use hierarchy and recursion to pick apart an input and dispatch parts of it to different subsystems, before returning a result.

The previous orchestrator model only had weights to work with to make a choice between results. This approach has much more nuanced control over the result, since the result can be returned from specific and specialized branches within the tree of routers.

Concepts