feat(llm): supply the newly injectable prompt bases - #24
Merged
Conversation
Add evaluationSystemPrompt, intentDetectionGuardPrompt, languageInstructionPrompt, searchResultsGuardPrompt and referenceDocumentsGuardPrompt to the LLM client component so the prompt text is configurable instead of hardcoded in AbstractLlmClient. The values are identical to the text that used to be hardcoded, so behavior is unchanged. Requires the matching setters from codelibs/fess#3281, which must merge first.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to codelibs/fess#3281, which turns the last five pieces of hardcoded prompt text in
AbstractLlmClientinto injectable properties. This PR supplies their values fromfess_llm++.xml, next to the 11 prompts already defined there:evaluationSystemPrompt— the evaluation system prompt, previously an inline text block inevaluateResults()intentDetectionGuardPrompt— the guard sentence appended bybuildIntentDetectionSystemPrompt()languageInstructionPrompt— the "respond in{{language}}" instructionsearchResultsGuardPrompt— the guard heading the search results blockreferenceDocumentsGuardPrompt— the guard heading the reference documents blockThe values are byte-identical to the text they replace, so behavior is unchanged. Prompts can now be customized through the documented
fess_llm+<component>.xmlredefinition file.Merge order
codelibs/fess#3281 must merge first. LastaDi fails at container boot on a property with no matching setter, so these entries against a fess-core without them would stop Fess from starting.
Testing
mvn test— full suite green.fess_llm++.xmlthrough LastaDi against refactor(llm): make the remaining hardcoded prompt bases injectable fess#3281: all 16 properties inject, and the five new values are byte-identical to the text removed in that PR.