Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LLM Expert Routing #23

Open
irthomasthomas opened this issue Sep 5, 2023 · 1 comment
Open

LLM Expert Routing #23

irthomasthomas opened this issue Sep 5, 2023 · 1 comment
Labels
AI-Agents Autonomous AI agents using LLMs AI-Chatbots Topics related to advanced chatbot platforms integrating multiple AI models Algorithms Sorting, Learning or Classifying. All algorithms go here. Automation Automate the things idea Just a seed of an idea llm Large Language Models RAG Retrieval Augmented Generation for LLMs

Comments

@irthomasthomas
Copy link
Owner

irthomasthomas commented Sep 5, 2023

I want to experiment with a reliable way to use a simple mix of experts, of a sort. I thought a pipeline starting with a classification. Some way put the request into a definite category. 5-10 Categories at most. Write a classifier prompt that demands a single word from a list, using function calling or not.
Possible algorithm:

  1. Truncate request to ~200 tokens?
  2. Send to an llm template for classification.

Prompt: Here is a an incoming request that requires classification. It has been truncated to 200 words.
System: Valid responses: Terminal, Bash, Web, Github, ...................

@irthomasthomas irthomasthomas added idea Just a seed of an idea llm Large Language Models labels Sep 5, 2023
@irthomasthomas
Copy link
Owner Author

Instead of prompting an llm to pick one word from a list, I could use logprobs, or logit_bias

Logprobs can be used used to return a value between 0 and 1.
Our router would consist of a number of, lets call them binary-filter-prompts. eg:

  • Can this text be classified as: "$class"?
  • Can this text be labelled as: "$label"?

Then we can hit the api in parallel for all the labels or classes we want probabilities for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AI-Agents Autonomous AI agents using LLMs AI-Chatbots Topics related to advanced chatbot platforms integrating multiple AI models Algorithms Sorting, Learning or Classifying. All algorithms go here. Automation Automate the things idea Just a seed of an idea llm Large Language Models RAG Retrieval Augmented Generation for LLMs
Projects
None yet
Development

No branches or pull requests

1 participant