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

Structured output example does not seem correct #12

Open
ezynda3 opened this issue Nov 2, 2024 · 0 comments
Open

Structured output example does not seem correct #12

ezynda3 opened this issue Nov 2, 2024 · 0 comments

Comments

@ezynda3
Copy link
Contributor

ezynda3 commented Nov 2, 2024

Currently the structured output example from the repo produces this prompt

Directives:
- Create a fictional person with a name, age, occupation, and hobbies
- Ensure the age is realistic for the occupation
- Include 1 to 5 hobbies
- Return ONLY the JSON data for the person, not the schema

Generate information about a fictional person

Expected Output Format:
Generate a JSON object that adheres to this schema:
{"$schema":"https://json-schema.org/draft/2020-12/schema","$id":"https://github.com/teilomillet/gollm/llm/prompt","$defs":{"Function":{"properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object"}},"additionalProperties":false,"type":"object","required":["name","description","parameters"]},"PromptMessage":{"properties":{"role":{"type":"string"},"content":{"type":"string"},"cache_type":{"type":"string"},"name":{"type":"string"},"tool_calls":{"items":{"$ref":"#/$defs/ToolCall"},"type":"array"},"tool_call_id":{"type":"string"}},"additionalProperties":false,"type":"object","required":["role","content"]},"Tool":{"properties":{"type":{"type":"string"},"function":{"$ref":"#/$defs/Function"}},"additionalProperties":false,"type":"object","required":["type","function"]},"ToolCall":{"properties":{"id":{"type":"string"},"type":{"type":"string"},"function":{"properties":{"name":{"type":"string"},"arguments":true},"additionalProperties":false,"type":"object","required":["name","arguments"]}},"additionalProperties":false,"type":"object","required":["id","type","function"]}},"properties":{"input":{"type":"string","description":"The main input text for the LLM"},"output":{"type":"string","description":"Specification for the expected output format"},"directives":{"items":{"type":"string"},"type":"array","description":"List of directives to guide the LLM"},"context":{"type":"string","description":"Additional context for the LLM"},"maxLength":{"type":"integer","minimum":1,"description":"Maximum length of the response in words"},"examples":{"items":{"type":"string"},"type":"array","description":"List of examples to guide the LLM"},"systemPrompt":{"type":"string","description":"System prompt for the LLM"},"systemCacheType":{"type":"string","description":"Cache type for the system prompt"},"messages":{"items":{"$ref":"#/$defs/PromptMessage"},"type":"array","description":"List of messages for the conversation"},"tools":{"items":{"$ref":"#/$defs/Tool"},"type":"array"},"tool_choice":{"type":"object"}},"additionalProperties":false,"type":"object","required":["input"]}
Do not include the schema in your response, only the generated data.
Messages:
user: Generate information about a fictional person

This seems like the the Person struct is not even used...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant