Skip to content

Structured output support #2459

Open
Open
@Abdulrahman392011

Description

@Abdulrahman392011

structured output is important. I use it a lot in my code. If you may post some templates as to how to use it with the liteRT, it will help a lot. Currently i run it with ollama in python in an ubuntu termux terminal. It works just fine except it doesn't support gpu inference or cpu offload in the future (looking forward to that) so i wanted to use liteRT API instead of ollama but structured output is critical for the code to run well.

Structured output is a way of reducing the model's hallucinations. It makes the model significantly more useful. Google ollama Structured output and read the blog post they have. Basically they form part of the response and force the model to fill in the blanks with a certain type (int, str, list, bool and so on) . This makes the model able to do things like answering mcq questions and extract information, it makes the model more useful.

It's especially apparent in smaller models when tasked with complex tasks.

Metadata

Metadata

Assignees

Labels

status:awaiting LiteRTerinformation is sufficient and the issue is escalatedtype:featureFor feature requests

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions