Repository navigation
feat: store explanations and votes on them in an Azure table - #215
Merged
Merged
Conversation
Member
Lets make this less intrusive and only store explanations (+ data) where the user intentionally provided feedback. This is more in line with expected user expectation since the optimizer is otherwise stateless and we otherwise store nothing without explicit consent. |
This was referenced Oct 16, 2026
Member
Author
|
Done in 8e15737: 🤖 Generated with Claude Code |
andig
force-pushed
the
feat/explain-feedback
branch
from
October 16, 2026 12:23
8e15737 to
d6f1185
Compare
The service stays stateless until a user votes. /optimize/explain/feedback takes the explain payload plus the explanation, the vote and a comment, and stores that as one row in the table explanations of the storage account stoptimizerfeedback.
andig
force-pushed
the
feat/explain-feedback
branch
from
October 16, 2026 12:25
d6f1185 to
07e9b97
Compare
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.
on top of #214, pairs with evcc-io/evcc#34926
Lets the caller vote on an explanation, so the prompt can be tuned from what users found wrong. The service stays stateless until a user votes:
/optimize/explainstores nothing and answers with the explanation alone.POST /optimize/explain/feedbacktakes the same payload as/optimize/explainplusexplanation,vote: up|downand an optionalcomment, and stores that as one row: the digest the model saw (gzip, split below the 64 KiB property limit), prompt hash, model, answer, vote, comment, language, plan features to group by (status, steps, horizon, vehicles, batteries, strategy, departure masses, goals, demands) and the sponsor subject as a hash. 503 without a store, 502 when the store fails.explanationsin a newstoptimizerfeedbackaccount; the container app writes with its managed identity (Storage Table Data Contributor),OPTIMIZER_FEEDBACK_TABLE_ENDPOINTin the bicep.OPTIMIZER_FEEDBACK_CONNECTION_STRINGfor Azurite and local runs. Nothing to put in the key vault.feedback.rows()reads the table back with the digests unpacked, for the analysis tooling.azure-data-tablesandazure-identityadded.Tests cover the round trip of long digests, the stored row, incomplete votes, that explain stores nothing, unconfigured store, store failure. The bicep builds.
🤖 Generated with Claude Code