diff options
Diffstat (limited to 'bash/consensus')
| -rwxr-xr-x | bash/consensus | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bash/consensus b/bash/consensus index 3df1908..f978614 100755 --- a/bash/consensus +++ b/bash/consensus @@ -223,7 +223,8 @@ CLAIMED CONFIDENCE: ${confidence} Based on the quality, completeness, and accuracy of this response, what is your confidence level? Respond with only: low, medium, or high" - judge_confidence=$(ollama run "${JUDGE_MODEL}" "${JUDGE_PROMPT}" | tr '[:upper:]' '[:lower:]' | xargs) + judge_output=$(ollama run "${JUDGE_MODEL}" "${JUDGE_PROMPT}") + judge_confidence=$(echo "${judge_output}" | tr '[:upper:]' '[:lower:]' | grep -o -i "\(low\|medium\|high\)" | head -n1) # Validate judge confidence if [[ ! "$judge_confidence" =~ ^(low|medium|high)$ ]]; then |