-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Motivation: Better inference latency, accuracy
The following code is some minimal code that generates a system prompt:
schema_manager = manager.A2uiSchemaManager(
version=constants.VERSION_0_9,
catalogs=[
# ...
],
)
system_prompt = schema_manager.generate_system_prompt(
role_description="...",
include_schema=True,
).strip()
print(system_prompt)| def generate_system_prompt( |
The generated system prompt has this structure:
<role description>
## Workflow description
The generated response MUST...
---BEGIN A2UI JSON SCHEMA---
### Server to Client Schema:
<server to client schema>
### Common Types Schema:
<common types schema>
### Catalog Schema:
<catalog schema>
---END A2UI JSON SCHEMA---
This task relates to both the <server to client schema> and <common types schema>.
<common types schema>can be automatically tree-shaken based on the<catalog schema>by traversing$refs. Recursively look up$refs, then drop unused types from<common types schemna>.<server to client schema>needs to be tree-shaken with intent from the user. Perhapsgenerate_system_promptshould be parameterized by a list of allowed messages (e.g.CreateSurfaceMessage)?
@nan-yu @jacobsimionato I'm still new to all this but let me know your thoughts!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels
Type
Projects
Status
Todo