Skip to content

FIX - Ollama Prompt Rendering & Course Documentation Improvements - #9

Merged
trayburn merged 7 commits into
improving:mainfrom
djscheuf:fix/ollama
Jul 16, 2026
Merged

FIX - Ollama Prompt Rendering & Course Documentation Improvements#9
trayburn merged 7 commits into
improving:mainfrom
djscheuf:fix/ollama

Conversation

@djscheuf

@djscheuf djscheuf commented Jul 15, 2026

Copy link
Copy Markdown
Contributor
  • Fixes Ollama Wrapper to render incoming prompts that reference a file with the files contents
    • Depends on being provided a 'documentRoot' value, which is where the prompt rendering will attempt to discover the file path from. e.g. if @prompt-under-test.md is located at the root of the project, and appears as such in the prompt sent to ollama, the wrapper will attempt to find the file contents by looking at path {root of the project}/prompt-under-test.md (ONLY in Provider Mode)
  • Updates Ollama Wrapper to support both Ollama and OpenAI API response standards. Should improve flexibility depending on if you are running something like Ollama or LM Studio for your local models.
  • Updated Ollama Wrapper GRADER Mode to simple pre-pend the System Prompt, avoiding uneven model support for System type messages.
    • Also adds a response guard to the GRADER mode, ensuring that if the model rambles in addition to the json grader output, the specific grader output is extracted and sent, so Promptfoo doesn't fall over.
  • Updated the How to Trust AI Readme
    • Added Install/Setup instructions listing steps to get setup for the class, including confirmation scripts for each step.
  • Updated the existing promptfoo config (both repo demo and course config) to use the provider labels when specifying the defaultTest options for graders.
    • Promptfoo only needed the former exec ... label because the id for our wrappers was also serving as the label.
    • Now that all our providers are labelled ( supporting multiple model tests), we can use the labels to specify the provider to use for grading.
    • This further allows complete Local EDD with Ollama, as the ollama config can be used both for Evaluation and Grading.
      • Without the use of label based grader assignment, you cannot use Ollama to grade performance.

@djscheuf djscheuf closed this Jul 16, 2026
@djscheuf

Copy link
Copy Markdown
Contributor Author

Realized I need to make another tweak to internals of Wrapper for improved stability

@djscheuf djscheuf reopened this Jul 16, 2026
@trayburn
trayburn merged commit 6151b55 into improving:main Jul 16, 2026
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

Successfully merging this pull request may close these issues.

2 participants