Skip to content

Panel-design run fails after CZI step: irrelevant CZI matches followed by parsing error... #4

@arashabadi

Description

@arashabadi

Thank you again for sharing SpatialAgent.

I’m trying to design a mouse lung influenza panel, but I have not yet had a successful end-to-end run.
The run reaches the CZI step, returns mostly irrelevant datasets, and then terminates with parsing error....

Observed behavior

CZI search executes:

search_czi_datasets({"query": "lung, Mus musculus", "n_datasets": 5})

but top matches can be non-lung tissues (e.g., embryo / skin). Shortly after that step, the agent prints parsing error....

Run stops early; no reliable final panel is produced. but For mouse + lung intent, top CZI results should be lung-relevant mouse datasets and the run should continue normally after CZI retrieval (no parser termination).

Suspected causes

  • search_czi_datasets appears to rank embeddings over broad metadata without strict pre-filtering by organism/tissue.
  • CZI tool output may be oversized/noisy (print + return duplication), which can increase parser fragility.

Must Fix (I think)

  1. Add structured filters in search_czi_datasets (before ranking):
    • organism, tissue, optional disease, strict=True.
    • Filter dataframe first, then rank within filtered rows.
  2. Add deterministic fallback when strict filters return no rows:
    • Controlled relaxation + clear warning.
  3. Remove duplicate large output payload:
    • Avoid both print(output) and return output for same content.
  4. Keep CZI output compact to reduce parser risk.

Should Fix

  1. Add ranking guardrails:
    • Strong penalty for organism mismatch.
    • Boost exact/partial tissue match (lung, respiratory).
  2. Update panel-design skill to prefer structured CZI constraints over free-text-only queries.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions