forgesight-eval
Run-correlated eval scores and human feedback for ForgeSight.
Quality joins cost and structure on the same run_id, on the same pipeline, in the same
backends — Langfuse scores, Phoenix evaluations, any OTLP sink — for two function calls.
pip install forgesight-eval
from forgesight import telemetry
from forgesight_eval import record_evaluation, record_feedback
with telemetry.agent_run("rag-answerer", metadata={"prompt_version": "v7"}) as run:
answer = await answer_question(...)
# an automated eval (LLM-as-judge / Ragas / DeepEval) → one call, correlated to the live run
record_evaluation("faithfulness", score=0.91, label="pass",
explanation="All claims grounded.", evaluator="ragas")
# hours later, from a webhook — post-hoc human feedback, by run_id:
def on_thumbs_down(run_id: str, comment: str) -> None:
record_feedback("user_satisfaction", run_id=run_id, label="thumbs_down",
score=0.0, comment=comment, source="human")
How it works
record_evaluationattaches to the current run (ambient context) — a real-time eval nests as a child span under the run's open trace.record_feedbackattaches to a past run byrun_id— a standalone record carrying the id so the backend re-associates it.- Both emit the OTel
gen_ai.evaluation.*attributes (name/score.value/score.label/explanation) plusforgesight.evaluation.*extensions (source,realtime,evaluator), and publish anEVALUATION_RECORDEDlifecycle event. Backends that speak the convention (Langfuse, Phoenix) display them as scores/evaluations with no per-backend code (P4). - Non-blocking (P6): both build a record and enqueue — no network I/O on the agent or the
webhook. Secure by default (P7):
explanation/commenttext is gated bycapture_explanationand the global content-capture switch.
Configuration
modules:
eval:
enabled: true # master switch (default false — install ≠ active)
emit_as: "span" # span | event
capture_explanation: true # still gated by the global content-capture switch (P7)
score_schema: # optional — validates score/label at the call site
faithfulness: { type: "numeric", min: 0.0, max: 1.0 }
user_satisfaction: { type: "categorical", labels: ["thumbs_up", "thumbs_down"] }
At least one of score / label must be set. Schema'd dimensions are validated (numeric range,
categorical membership); un-schema'd dimensions are accepted unvalidated (open set).
Out of scope
Running the evaluations (judges/metrics live in the agent or a library — this is the transport), a dashboard, and score storage/aggregation (the backend's job).
License
Apache-2.0
Metadata
Release files for forgesight-eval 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| forgesight_eval-0.1.1.tar.gz | 7.6 kB | Without provenance | Details for forgesight_eval-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| forgesight_eval-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for forgesight_eval-0.1.1-py3-none-any.whl |
Total release size: 15.4 kB
Release files / forgesight_eval-0.1.1.tar.gz
| Download URL | forgesight_eval-0.1.1.tar.gz |
|---|---|
| Size | 7.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
716abd0ff7cbd3c598d25fdec4ccf90cb5c0ed0f6905c8e772a87d4ead48d3ae
|
|
BLAKE2b-256 checksum How to use checksums |
1cb685f65b0c281abd5643fca5c215936433d26182e3b6694b7e6c6899310b50
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Release files / forgesight_eval-0.1.1-py3-none-any.whl
| Download URL | forgesight_eval-0.1.1-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
540e37999b59b927acefccdf401d0c22fe1a861d9ee4ce80b20f595135771d29
|
|
BLAKE2b-256 checksum How to use checksums |
88e05bda2e9f06fd76dc6ddf9dff433c81a23cb143667b706729bc9cb5d81e4d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.15
|
Security for forgesight-eval 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.