One Philter Scope audit tells you how a policy scores today. Policies change, Philter is upgraded, and new kinds of documents arrive, so the useful question is how the score has moved. Every audit is saved to a history, and philterscope-serve shows that history as a trend for each group of related runs, with notes and the status of each recommendation alongside.
This guide covers where the history is kept, how to group runs, how to share history across a team with MongoDB, and how to read the dashboard. It assumes you can already run an audit, as in Measure redaction accuracy with Philter Scope.
Where the history is kept
Every successful audit is saved to history in addition to report.html and report.json. Without any configuration, the history is a .philterscope directory in the directory you run philterscope-audit from, with one JSON file per audit. This guide uses Philter Scope 0.2.0 or later, built from source. After three audits:
ls .philterscope
audit_20261201_125330_9a18a2c2.json
audit_20261201_125337_ad86666a.json
audit_20261201_125403_40bc8e88.json
The file names start with the time of the audit. Run every audit for a policy from the same directory, or its history is split across several .philterscope directories. Each audit is written to its own file under a unique ID, so two audits can save at once, but nothing coordinates two people changing notes or recommendation status at the same time. Local history suits one user on one machine.
Group related runs
--group names the series an audit belongs to, and defaults to default. The dashboard draws one trend per group, so use one group for each policy and golden set you track, and keep the group name stable:
./philterscope-audit \
--url https://localhost:8080 \
--token "$PHILTER_API_KEY" \
--ca-cert philter.pem \
--policy claims-intake \
--input ./audit/raw \
--golden ./audit/golden \
--output ./reports/v3 \
--threshold 0.9 \
--precision-floor 0.5 \
--group claims-intake
A trend means something only when the runs in it are comparable. Keep the golden set and the thresholds the same within a group, and start a new group when you change the golden set, so a jump in the numbers is not mistaken for a change in the policy. Each audit also records the policy Philter returned for it, so the history shows which policy produced each score.
Share the history with MongoDB
Set PHILTERSCOPE_MONGODB_CONNECTION_STRING, and audits are saved to MongoDB instead of the local directory. The database name comes from the path of the connection string, and defaults to philterscope. Audits go into a collection named audits.
For a trial on your own machine, run MongoDB in Docker, listening only on the local interface:
docker run -d --name philterscope-mongo -p 127.0.0.1:27017:27017 mongo:8.2.12
export PHILTERSCOPE_MONGODB_CONNECTION_STRING=mongodb://localhost:27017/philterscope
For a shared deployment, use a MongoDB server that requires authentication and TLS, and put the credentials in the connection string. Then run the audits as before. After three runs of the claims-intake group, one for each revision of the policy:
docker exec philterscope-mongo mongosh --quiet philterscope --eval \
'db.audits.find({}, {_id: 0, group_name: 1, recall: 1, precision: 1, f1_score: 1}).sort({timestamp: 1})'
[
{
precision: 1,
recall: 0.7647058823529411,
f1_score: 0.8666666666666666,
group_name: 'claims-intake'
},
{
precision: 0.7391304347826086,
recall: 1,
f1_score: 0.85,
group_name: 'claims-intake'
},
{ precision: 1, recall: 1, f1_score: 1, group_name: 'claims-intake' }
]
If MongoDB cannot be reached, the audit prints Warning: failed to save to MongoDB with the reason after the driver’s connection timeout, about 30 seconds, and saves to the local .philterscope directory instead. The run still exits with status 0, so a scheduled job that must land in MongoDB has to check its output for that warning.
Browse the history
Start the dashboard from the directory that holds the history, or with the same connection string set:
./philterscope-serve --privacy
philterscope-serve chooses what to show in this order:
- MongoDB, when
PHILTERSCOPE_MONGODB_CONNECTION_STRINGis set. An unreachable server does not make it fall back: the page shows a MongoDB connection error and/api/readyzreturns503. Only a connection string that cannot be parsed falls back to the options below. - A single report: the file given with
--report, or areport.jsonin the current directory. - The local
.philterscopehistory, announced withServing audit history from .philterscope.
A report.json in the current directory therefore takes precedence over the local history. If the dashboard shows one audit and no group selector, start it from a directory without one. The readiness endpoint says which source it picked:
curl http://localhost:5000/api/readyz
{"status":"READY","mode":"mongodb"}
The mode is mongodb, file for the local history, or report for a single report.
In history mode, choose a group at the top of the page. The audit selector lists that group’s audits, newest first, each with its F1 and an arrow showing whether F1 rose or fell from the audit before it, and a warning sign when overall recall is below that audit’s threshold. The trend chart plots recall, precision, and F1 for every audit in the group:

This group shows the three runs from Tune a policy from Philter Scope’s recommendations: enabling the phone filter raised recall and cost precision, and a confidence condition restored precision.
For each audit, the dashboard also has:
- Notes. Record why the policy changed, such as “phone filter also matched ten-digit claim numbers”, so the reason stays with the score.
- Recommendation status. Mark a recommendation resolved when the next audit shows it fixed, or dismissed when you have decided not to act on it.
- Delete. Removes an audit from the history after a confirmation.
These are available only in history mode, from MongoDB or the local directory. A single report is read-only.
Protect the history
- The history holds your documents’ text. Each audit stores the golden documents and Philter’s output, so a golden set of real records puts those records in the history.
--privacyreplaces the text of labeled and detected spans in the dashboard with a short hash, but the history files and the MongoDB collection keep the original text. Store the history where the source documents are allowed to be. - The dashboard has no sign-in. Anyone who can reach its port can read every audit, change notes, and delete audits. Run it on your own machine, or behind a proxy that adds authentication and TLS.
To run the dashboard as a service, point a liveness probe at /api/health, which answers without touching storage, and a load balancer at /api/readyz, which returns 503 when MongoDB cannot be reached. /metrics serves Prometheus metrics for the dashboard’s API.