Skip to content

feat(llm): supply the newly injectable prompt bases - #24

Merged
marevol merged 1 commit into
mainfrom
feat/configurable-llm-prompt-bases
Aug 13, 2026
Merged

feat(llm): supply the newly injectable prompt bases#24
marevol merged 1 commit into
mainfrom
feat/configurable-llm-prompt-bases

Conversation

@marevol

@marevol marevol commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Summary

Companion to codelibs/fess#3281, which turns the last five pieces of hardcoded prompt text in AbstractLlmClient into injectable properties. This PR supplies their values from fess_llm++.xml, next to the 11 prompts already defined there:

  • evaluationSystemPrompt — the evaluation system prompt, previously an inline text block in evaluateResults()
  • intentDetectionGuardPrompt — the guard sentence appended by buildIntentDetectionSystemPrompt()
  • languageInstructionPrompt — the "respond in {{language}}" instruction
  • searchResultsGuardPrompt — the guard heading the search results block
  • referenceDocumentsGuardPrompt — the guard heading the reference documents block

The values are byte-identical to the text they replace, so behavior is unchanged. Prompts can now be customized through the documented fess_llm+<component>.xml redefinition 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

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.
@marevol
marevol merged commit d2488a9 into main Aug 13, 2026
1 check passed
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.

1 participant