Launch Week 02 wrapped — explore all five launches

Build Filtered Views from a URL

Write filters directly into a Confident AI page URL to open any list — test runs, test cases, traces, and more — already filtered.

Overview

Confident AI allows you to filter your traces, test runs, test cases and any other lists, these filters are applied in your URL parameters and can be shared with anyone. You can also build these filters manually in JSON and convert them to URLs.

This guide shows how to write that JSON, combine multiple filters, and encode the link in your language of choice — followed by a reference of everything you can filter on.

Build a filter

  1. Start from a page URL

    Start with the URL of the page you want to filter. It's the same shape on every list:

    https://app.confident-ai.com/project/YOUR_PROJECT_ID/test-runs
    https://app.confident-ai.com/project/YOUR_PROJECT_ID/observatory/traces
    

    You'll add two query parameters:

    • filters — your filters as JSON, compressed (step 3 shows how).
    • operatorAND or OR, describing how multiple filter groups combine.
  2. Write your filters as JSON

    Filters are organized into groups. Each group has an operator and a list of conditions, and each condition is a single filter containing a category (what you're filtering on), a condition, and a value:

    [
      {
        "operator": "AND",
        "filters": [
          { "category": "Metadata", "key": "environment", "condition": "Is", "value": "production" }
        ]
      }
    ]
    • Conditions inside a group combine using that group's operator.
    • Groups combine using the top-level operator query parameter.

    The filter reference below lists the exact category, condition, and value for every property, on each page.

  3. Encode it and add to the URL

    Confident AI stores the filters value as a compressed string using the lz-string library. Compress your JSON with compressToEncodedURIComponent, then append the result as filters (it's already URL-safe) and set operator:

    https://app.confident-ai.com/project/YOUR_PROJECT_ID/test-runs?filters=COMPRESSED_STRING&operator=AND
    
    npm install lz-string
    import LZString from "lz-string";
    
    const filters = [
      {
        operator: "AND",
        filters: [
          { category: "Metadata", key: "environment", condition: "Is", value: "production" },
        ],
      },
    ];
    
    const encoded = LZString.compressToEncodedURIComponent(JSON.stringify(filters));
    const url = `https://app.confident-ai.com/project/YOUR_PROJECT_ID/test-runs?filters=${encoded}&operator=AND`;

    Done ✅. Opening the link loads the page with the filter applied.

Filter reference

The properties you can filter on depend on the page — each page's full set is below. Two shorthands used in the tables:

  • Numeric conditionsIs less than, Is equal or less than, Is greater than, Is equal or greater than, Is equal to, Does not equal.
  • Tag conditionsContains, Contains only, Does not contain.
  • Everything else uses Is / Is not unless a row says otherwise.

Most properties use their category as the key. A few take a custom key — the name you're filtering on: Metadata (a metadata key), Hyperparameter (a hyperparameter name), Metric Status / Metric Score (a metric name), Criteria (a criteria name), and Classifier (a signal name).

Test runs
PropertycategoryConditionsvalue
Test run IDTest Run IDIs, Is notthe test run's ID
IdentifierIdentifierIs, Is notthe run identifier
Test fileTest FileIs, Is notthe test file name
DatasetDatasetIs, Is notthe dataset alias
StatusStatusIs, Is notCOMPLETED, IN_PROGRESS, ERRORED, or CANCELLED
OfficialOfficialIs, Is notOfficial or Not official
Evals modeEvals ModeIs, Is notEnd-to-End or Component-Level
Tests passedTests Passednumeric conditionsa whole number
Tests failedTests Failednumeric conditionsa whole number
Pass ratePass Ratenumeric conditionsa percentage, e.g. 90
Fail rateFail Ratenumeric conditionsa percentage, e.g. 10
TagsTagstag conditionsone or more tags, e.g. ["prod", "smoke"]
Trace attachedTraceIs, Is notSet or Not Set
Annotations attachedAnnotationsIs, Is notSet or Not Set
Annotation nameAnnotation NameIs, Is notthe annotation's name
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Hyperparameter (key: hyperparameter name)HyperparameterIs, Is notthe hyperparameter value
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Test cases
PropertycategoryConditionsvalue
Test case IDTest Case IDIs, Is notthe test case's ID
NameNameIs, Is notthe test case name
TagsTagstag conditionsone or more tags, e.g. ["billing"]
Trace attachedTraceIs, Is notSet or Not Set
Trace IDTrace UuidIs, Is notthe trace ID
Trace nameTrace NameIs, Is notthe trace name
Trace statusTrace StatusIs, Is notPassing or Failing
Trace tagsTrace Tagstag conditionsone or more tags
Span nameSpan NameIs, Is notthe span name
Span typeSpan TypeIs, Is notLLM, AGENT, RETRIEVER, TOOL, or SPAN
Span statusSpan StatusIs, Is notPassing or Failing
ModelModelIs, Is notthe model name
EmbedderEmbedderIs, Is notthe embedder name
Chunk sizeChunk SizeIs, Is nota number
Top-KTop-KIs, Is nota number
Annotation nameAnnotation NameIs, Is notthe annotation's name
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Traces
PropertycategoryConditionsvalue
Trace IDTrace UuidIs, Is nota trace ID
Name (trace name)NameIs, Is nota trace name
Thread IDThread IdIs, Is nota thread ID
User IDUser IdIs, Is notan end-user ID
TagsTagsContains, Contains only, Does not containone or more tags
Tools calledTools Calledtag conditionsone or more tool names
Metrics status (overall)Metrics StatusIs, Is notPassing or Failing
Error statusError StatusIs, Is notPassing or Failing
EnvironmentEnvironmentIs, Is notproduction, development, staging, or testing
Metric name (which metrics ran)Metric NameContains, Contains only, Does not containone or more metric names
Review flagReview flagIs, Is notFlagged or Not flagged
Annotation nameAnnotation NameIs, Is notan annotation name
AnnotatorAnnotatorIs, Is notan annotator (by email)
End userEnd UserIs, Is notan end-user ID
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Annotation dateAnnotation DateIs betweena date range
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Classifier (key: signal name)ClassifierIs, Is notthe classifier value
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Spans

Some properties apply only to a specific span type (noted in the row).

PropertycategoryConditionsvalue
Span IDSpan UuidIs, Is nota span ID
Name (span name)NameIs, Is nota span name
Trace IDTrace UuidIs, Is nota trace ID
IntegrationIntegrationIs, Is notan integration
Metrics status (overall)Metrics StatusIs, Is notPassing or Failing
Error statusError StatusIs, Is notPassing or Failing
Model (LLM spans)ModelIs, Is nota model name
Provider (LLM spans)ProviderIs, Is nota provider
Prompt alias (LLM spans)Prompt AliasIs, Is nota prompt alias
Prompt version (LLM spans)Prompt VersionIs, Is nota prompt version
Prompt label (LLM spans)Prompt LabelIs, Is nota prompt label
Prompt commit hash (LLM spans)Prompt Commit HashIs, Is nota commit hash
Embedder (retriever spans)EmbedderIs, Is notan embedder
Chunk size (retriever spans)Chunk SizeIs, Is nota number
Top-K (retriever spans)Top-KIs, Is nota number
EnvironmentEnvironmentIs, Is notproduction, development, staging, or testing
Metric name (which metrics ran)Metric NameContains, Contains only, Does not containone or more metric names
Annotation nameAnnotation NameIs, Is notan annotation name
AnnotatorAnnotatorIs, Is notan annotator (by email)
End userEnd UserIs, Is notan end-user ID
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Annotation dateAnnotation DateIs betweena date range
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Threads
PropertycategoryConditionsvalue
Thread IDThread IdIs, Is nota thread ID
User IDUser IdIs, Is notan end-user ID
Metrics status (overall)Metrics StatusIs, Is notPassing or Failing
TagsTagsContains, Contains only, Does not containone or more tags
EnvironmentEnvironmentIs, Is notproduction, development, staging, or testing
Metric name (which metrics ran)Metric NameContains, Contains only, Does not containone or more metric names
Trace countTrace Countnumeric conditionsa number
Annotation nameAnnotation NameIs, Is notan annotation name
AnnotatorAnnotatorIs, Is notan annotator (by email)
End userEnd UserIs, Is notan end-user ID
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outcomeExpected OutcomeIs, Is notSet or Not Set
Annotation dateAnnotation DateIs betweena date range
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Classifier (key: signal name)ClassifierIs, Is notthe classifier value
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Users
PropertycategoryConditionsvalue
Thread IDThread IdIs, Is nota thread ID
TagsTagstag conditionsone or more tags
ModelModelIs, Is nota model name
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Metric status (key: metric name)Metric StatusIs, Is notPassing or Failing
Metric score (key: metric name)Metric Scorenumeric conditionsa number 01
Metadata (key: metadata key)MetadataIs, Is notthe metadata value
Datasets
PropertycategoryConditionsvalue
Golden IDGolden IDIs, Is nota golden ID
Ingestion taskIngestion TaskIs, Is notan ingestion-task name
FinalizedFinalizedIs, Is notTrue or False
TagsTagstag conditionsone or more tags
Assigned toAssigned toIs, Is nota project member (by email)
Requested review fromRequested review fromIs, Is nota project member (by email)
Human annotation
PropertycategoryConditionsvalue
Annotation typeAnnotation TypeIs, Is notThumbs Up/Down or Star Rating
AnnotatorAnnotatorIs, Is notan annotator (by name / email)
End userEnd UserIs, Is notan end-user ID
ExplanationExplanationIs, Is notSet or Not Set
Expected outputExpected OutputIs, Is notSet or Not Set
Annotation dateAnnotation DateIs betweena date range
Star ratingStar RatingIs, Is nota number 15
Thumbs ratingThumbs RatingIs, Is not1 (up) or 0 (down)
Criteria (key: criteria name)CriteriaIs, Is nota star rating 15, or thumbs 1/0
Risk profile
PropertycategoryConditionsvalue
Assessment IDAssessment IDIs, Is notan assessment ID
IdentifierIdentifierIs, Is notan identifier
FrameworkFrameworkIs, Is nota framework name
StatusStatusIs, Is notCOMPLETED, IN_PROGRESS, ERRORED, or CANCELLED
OfficialOfficialIs, Is notOfficial or Not official
Risk categoryRisk CategoryIs, Is nota risk category
Attack methodAttack MethodIs, Is notan attack method
Tests passedTests Passednumeric conditionsa whole number
Tests failedTests Failednumeric conditionsa whole number
Pass ratePass Ratenumeric conditionsa percentage
Fail rateFail Ratenumeric conditionsa percentage
VulnerabilityVulnerabilityIs, Is nota vulnerability
Vulnerability typeVulnerability TypeIs, Is nota vulnerability type
Red-teaming test cases
PropertycategoryConditionsvalue
Test case IDTest Case IDIs, Is nota test-case ID
VulnerabilityVulnerabilityIs, Is nota vulnerability
Vulnerability typeVulnerability TypeIs, Is nota vulnerability type
Attack methodAttack MethodIs, Is notan attack method
Risk categoryRisk CategoryIs, Is nota risk category
StatusStatusIs, Is notPassing, Failing, or Errored

Examples

Each example below is the filters JSON — compress it (step 3) and add it to the URL.

Filter by a metadata value. Test runs whose test cases carry environment: production:

[
  {
    "operator": "AND",
    "filters": [
      { "category": "Metadata", "key": "environment", "condition": "Is", "value": "production" }
    ]
  }
]

Filter by a hyperparameter. Test runs that used the gpt-4o value for a model hyperparameter — just the name and value, no ID:

[
  {
    "operator": "AND",
    "filters": [
      { "category": "Hyperparameter", "key": "model", "condition": "Is", "value": "gpt-4o" }
    ]
  }
]

Combine conditions in one group. Completed runs whose test cases carry environment: production — both must hold, so the group's operator is AND:

[
  {
    "operator": "AND",
    "filters": [
      { "category": "Metadata", "key": "environment", "condition": "Is", "value": "production" },
      { "category": "Status", "key": "Status", "condition": "Is", "value": "COMPLETED" }
    ]
  }
]

Combine groups with OR. Runs that are either official or have a passing Answer Relevancy metric — two groups joined by the top-level operator=OR:

[
  {
    "operator": "AND",
    "filters": [
      { "category": "Official", "key": "Official", "condition": "Is", "value": "Official" }
    ]
  },
  {
    "operator": "AND",
    "filters": [
      { "category": "Metric Status", "key": "Answer Relevancy", "condition": "Is", "value": "Passing" }
    ]
  }
]

Next Steps

Filtered links pair well with the workflows that produce the runs you're filtering.

Scaling beyond prototype?For teams evaluating Confident AI in productionTalk to us
Built byConfident AI