Skip to content

feat: Trust scoring with feedback API (importance adjustment via helpful/unhelpful) #718

Description

@ajianaz

Problem

Uteke has an importance field (0.0-1.0) on every memory, but no mechanism to adjust it from consumer feedback. The only way to set importance is via POST /memory/importance with a direct value. There is no signal loop where recall consumers can indicate whether a memory was helpful or unhelpful.

Hermes holographic memory implements asymmetric feedback: helpful +0.05, unhelpful -0.10, clamped to [0,1]. This creates a trust signal that improves recall quality over time.

Proposed Solution

New endpoint: POST /memory/feedback

Request body: { "id": "uuid", "action": "helpful" | "unhelpful" }

  • helpful: importance += 0.05, clamped to 1.0
  • unhelpful: importance -= 0.10, clamped to 0.0
  • Asymmetric: punish bad more than reward good
  • Returns the updated memory

New core function: Uteke::feedback(memory_id, helpful)

Add to operations.rs. Compute delta, UPDATE memories SET importance WHERE id.

CLI command: uteke feedback --helpful|--unhelpful

Files to Change

  • crates/uteke-core/src/operations.rs - feedback() function
  • crates/uteke-server/src/handlers.rs - POST /memory/feedback route
  • crates/uteke-server/src/types.rs - FeedbackRequest struct
  • crates/uteke-server/src/main.rs - endpoint help text

Acceptance Criteria

  • POST /memory/feedback returns updated memory
  • helpful: +0.05 max 1.0, unhelpful: -0.10 min 0.0
  • 404 for non-existent UUID
  • Invalid UUID returns 400
  • cargo test passes
  • cargo fmt --all passes

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestrustPull requests that update rust codescope:coreCore engine worktype:featureNew feature

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions