lennartpollvogt / ollama-instructor

Python library for the instruction and reliable validation of structured outputs (JSON) of Large Language Models (LLMs) with Ollama and Pydantic. -> Deterministic work with LLMs.
MIT License
65 stars 3 forks source link

Add reasoning capabilities to ollama-instructor #3

Closed lennartpollvogt closed 3 months ago

lennartpollvogt commented 4 months ago

Allow reasoning when „format“ = „“ In this case the system prompt will be (in any case) have a instruction for the LLM to respond the JSON in a code Block which starts with ‘‘‘ and ends with ‘‘‘.

What’s needed? – Two kind of system prompts (old and new) + additional prompt when user comes with own system prompt but chooses format = „“ – new method to extract the JSON from the response (code block)

Why? – enhance the quality of the response by allowing the LLM to reason – make a chat-like experience possible

lennartpollvogt commented 3 months ago

Implemented with Release of version 0.4.0 See: https://github.com/lennartpollvogt/ollama-instructor/releases/tag/v0.4.0