Class TraceEvalRule

java.lang.Object
dev.dokimos.server.entity.TraceEvalRule

@Entity public class TraceEvalRule extends Object
A per-project rule that enqueues an online judge evaluation when an ingested span matches. The match is by span name or by an attribute key/value (see TraceMatchType). The rule carries the judge configuration (evaluator name, criteria, score range, threshold) and the LlmConnection used to call the judge. At most one rule per (project, name) pair.
  • Constructor Details

  • Method Details

    • matches

      public boolean matches(TraceSpan span)
      Returns whether the given span matches this rule. For TraceMatchType.SPAN_NAME the span name must equal the match value; for TraceMatchType.ATTRIBUTE the span attribute named by the match key must be present and its string form must equal the match value.
      Parameters:
      span - the candidate span
      Returns:
      true when the span satisfies the rule's match condition
    • getId

      public UUID getId()
    • getProjectId

      public UUID getProjectId()
    • getTenantId

      public String getTenantId()
    • setTenantId

      public void setTenantId(String tenantId)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • isEnabled

      public boolean isEnabled()
    • setEnabled

      public void setEnabled(boolean enabled)
    • getMatchType

      public TraceMatchType getMatchType()
    • setMatchType

      public void setMatchType(TraceMatchType matchType)
    • getMatchKey

      public String getMatchKey()
    • setMatchKey

      public void setMatchKey(String matchKey)
    • getMatchValue

      public String getMatchValue()
    • setMatchValue

      public void setMatchValue(String matchValue)
    • getConnection

      public LlmConnection getConnection()
    • setConnection

      public void setConnection(LlmConnection connection)
    • getEvaluatorName

      public String getEvaluatorName()
    • setEvaluatorName

      public void setEvaluatorName(String evaluatorName)
    • getCriteria

      public String getCriteria()
    • setCriteria

      public void setCriteria(String criteria)
    • getMinScore

      public double getMinScore()
    • setMinScore

      public void setMinScore(double minScore)
    • getMaxScore

      public double getMaxScore()
    • setMaxScore

      public void setMaxScore(double maxScore)
    • getThreshold

      public Double getThreshold()
    • setThreshold

      public void setThreshold(Double threshold)
    • getCreatedAt

      public Instant getCreatedAt()
    • getUpdatedAt

      public Instant getUpdatedAt()
    • touchUpdatedAt

      public void touchUpdatedAt()
      Stamps the rule as just modified.