-
-
Notifications
You must be signed in to change notification settings - Fork 264
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
Design new LLM database schema #556
Comments
Current schema: Lines 146 to 168 in e867e13
|
Since some of these features are specific to Claude, it may make sense to have some kind of JSON column that specific LLM plugins can use to record information that only they care about - maybe using JSON keys with their name in e.g. |
Does it even make sense for a conversation that was "real" (user submits a prompt, gets a model response, sends a reply, gets another model response) to be stored in the same schema as a conversation with simulated aspects (user sends an example-prompt/example-response/example-prompt/example-resoponse/real-prompt sequence)? I think it does, especially since any follow-up prompts after that will still send the full sequence that's been stored just as it would if it wasn't full of mocked data. Terminology here is hard. Are these "fake" responses? "mock" responses? Something else? |
Worth considering tools here too, since those may require special thought about how to construct the schema. |
I think "extras" might be a good way to model extra things that are specific to certain models. I could have a Not sure they should have the same name though, the
|
Here's a schema consideration from tool use with Claude - a response might come back like this: https://docs.anthropic.com/en/docs/build-with-claude/tool-use#example-api-response-with-a-tool-use-content-block {
"id": "msg_01Aq9w938a90dw8q",
"model": "claude-3-5-sonnet-20240620",
"stop_reason": "tool_use",
"role": "assistant",
"content": [
{
"type": "text",
"text": "<thinking>I need to use the get_weather, and the user wants SF, which is likely San Francisco, CA.</thinking>"
},
{
"type": "tool_use",
"id": "toolu_01A09q90qw90lq917835lq9",
"name": "get_weather",
"input": {"location": "San Francisco, CA", "unit": "celsius"}
}
]
} How should that be stored in the database? It's a single response from the assistant but it has two items in content - one of type Also from that section of documentation:
|
The LLM database schema for storing responses needs to evolve to support some new features:
"cache_control": {"type": "ephemeral"}
rule was injected.<!doctype html><html>
to ensure an HTML response for example. If that trick is used it should be recorded in the database as well.The text was updated successfully, but these errors were encountered: