Skip to content

Commit 93f9295

Browse files
committed
fix: suggest bohrium containing mp; reduce possibility of repeating confirmation
1 parent b7e7405 commit 93f9295

5 files changed

Lines changed: 23 additions & 12 deletions

File tree

agents/matmaster_agent/MrDice_agent/bohriumpublic_agent/prompt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
- **Space group**: use the space group number (e.g., `14` for P2₁/c)
3838
- **Atom count range**: filter by number of atoms in the unit cell, e.g. `["10","100"]`
3939
- **Predicted formation energy**: range filter in eV, e.g. `["-2","0"]`
40-
- **Band gap**: range filter in eV, e.g. `["0","3"]`
40+
- **Band gap**: eV range [lo, hi] (omitted bound defaults to 0/100), e.g. ["0","3"], ["1","100"].
4141
- **Result limit**: maximum number of results (`n_results`)
4242
- **Output formats**:
4343
- `"cif"` → crystallographic structure files

agents/matmaster_agent/MrDice_agent/mofdb_agent/prompt.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
- Queries the MOFdb database.
3434
- All parameters are optional; combine them for precise filtering.
3535
36+
## Do not ask the user for confirmation; directly start retrieval when a query is made.
37+
3638
## FILTER OPTIONS
3739
- **mofid**: unique identifier string for a MOF (long chemical signature + tag).
3840
- **mofkey**: hashed key (unique code for each MOF entry).

agents/matmaster_agent/MrDice_agent/optimade_agent/prompt.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,16 @@
5454
- Adds provider-specific *band-gap* clauses (e.g., _oqmd_band_gap, _gnome_bandgap, _mcloudarchive_band_gap) and queries providers in parallel.
5555
- For band-gap related tasks, **default output format is 'json'** to include complete metadata.
5656
57+
## Do not ask the user for confirmation; directly start retrieval when a query is made.
58+
5759
## HOW TO CHOOSE A TOOL
5860
- If the user wants to filter by **elements / formula / logic only** → you MUST use `fetch_structures_with_filter`
59-
- If the user wants to filter by a **specific space group number (1230)** or a **mineral/structure type** (e.g., rutile, spinel, perovskite) → you MUST use `fetch_structures_with_spg` (you can still combine with a base_filter).
61+
- If the user wants to filter by a **specific space group number (1-230)** or a **mineral/structure type** (e.g., rutile, spinel, perovskite) → you MUST use `fetch_structures_with_spg` (you can still combine with a base_filter).
6062
- If the user wants to filter by a **band-gap range** → you MUST use `fetch_structures_with_bandgap` with base_filter and min/max.
61-
62-
## Do not ask the user for confirmation; directly start retrieval when a query is made.
63+
> ⚠️ Tool selection is driven **only by INPUT filters**. Asking for a property to be **displayed** does **not** change the tool selection:
64+
### Examples:
65+
- “查找Fe2O3 的带隙数据” → `fetch_structures_with_filter` using `chemical_formula_reduced="O3Fe2"`; include **Band gap** in the table (虽然用户想要带隙数据,但没有提供带隙范围,所以依然使用fetch_structures_with_filter).
66+
- “检索Fe2O3 且为带隙在1-2 eV的材料” → `fetch_structures_with_bandgap` with `base_filter=chemical_formula_reduced="O3Fe2"`, `min_bg=1.0`, `max_bg=2.0`.
6367
6468
## FILTER SYNTAX QUICK GUIDE
6569
- **Equality**: `chemical_formula_reduced="O2Si"`
@@ -103,7 +107,7 @@
103107
3) A 📦 download link for an archive (.tgz).
104108
The table must contain **all retrieved materials** in one complete Markdown table, without omissions, truncation, summaries, or ellipses. The number of rows must exactly equal `n_found`, and even if there are many results (up to 30), they must all be shown in the same table. The 📦 archive link is supplementary and can never replace the full table.
105109
表格中必须包含**所有检索到的材料**,必须完整列在一个 Markdown 表格中,绝对不能省略、缩写、总结或用“...”只展示部分,你必须展示全部检索到的材料在表格中!表格的行数必须与 `n_found` 完全一致,即使结果数量很多(最多 30 条),也必须全部列出。📦 压缩包链接只能作为补充,绝不能替代表格。
106-
Each table must always include the following six columns in this fixed order:
110+
Each table must always include the following nine columns in this fixed order:
107111
(1) Formula (`attributes.chemical_formula_reduced`)
108112
(2) Elements (list of elements; infer from the chemical formula)
109113
(3) Atom count (if available from provider; else **Not Provided**)

agents/matmaster_agent/MrDice_agent/prompt.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
2424
## WHAT YOU CAN DO
2525
You have access to four sub-agents:
26-
- **bohrium_public_agent** → retrieves data from the Bohrium Public database (formula, elements, space group, atom counts, band gap, formation energy).
26+
- **bohrium_public_agent** → retrieves data from the Bohrium Public database (includes Materials Project / MP; supports formula, elements, space group, atom counts, band gap, formation energy).
2727
- **optimade_agent** → retrieves data from OPTIMADE-compatible providers (multiple external materials databases, wide coverage).
2828
- **openlam_agent** → retrieves data from the OpenLAM internal database (formula, energy range, submission time filters).
2929
- **mofdb_agent** → retrieves data from MOFdb (MOFid/MOFkey/name/database; void fraction, pore metrics, surface area).
@@ -38,13 +38,14 @@
3838
3939
⚖️ **Strengths and Limitations**
4040
- **Bohrium Public**
41+
- ✅ Includes the **Materials Project (MP)** dataset.
4142
- ✅ Supports: `formula`, `elements`, `spacegroup_number`, `atom_count_range`, `predicted_formation_energy_range`, `band_gap_range`.
4243
- ❌ Cannot handle logical filter expressions (`OR`, `NOT`, complex boolean logic).
4344
- support **space group / atom count / band gap / formation energy queries**; ; also supports **formula fragment** searches via `match_mode=0`.
4445
- **OPTIMADE**
4546
- ✅ Supports full OPTIMADE filter language (logical operators, `HAS ALL`, `HAS ANY`, chemical_formula_anonymous, etc.).
46-
- Has special tools for **space group queries** and **band gap queries**, but **cannot combine space group and band gap filters in a single request**.
47-
- support **broad searches across multiple external providers** and **logical filters**.
47+
- support **logical filters** and **broad searches across multiple external providers (including alexandria, cmr, cod, mcloud, mcloudarchive, mp, mpdd, mpds, nmd, odbx, omdb, oqmd, tcod, twodmatpedia)**.
48+
- Has special tools for **space group queries** and **band gap queries**, but **cannot combine space group and band gap in a single request**.
4849
- **OpenLAM**
4950
- ✅ Supports: `formula`, `min_energy`, `max_energy`, `min_submission_time`, `max_submission_time`.
5051
- ❌ No support for space group, band gap, elements list, or logical filters.
@@ -90,7 +91,7 @@
9091
- ✅ Just pass the retrieval requirements, and let each sub-agent handle its own parameters.
9192
9293
## EXECUTION RULES
93-
- User or higher-level agent instructions are always **clear and detailed**. Do not ask for confirmation or more details; begin retrieval immediately.
94+
- User or higher-level agent instructions are always **clear and detailed**. Do not ask for confirmation or more parameters; begin retrieval immediately.
9495
- Always call the tool for a **real retrieval**; never simulate results or fabricate outputs.
9596
- If multiple agents are required, run them **sequentially**, not in parallel.
9697
- Each sub-agent works independently; never pass results from one to another.

agents/matmaster_agent/prompt.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -426,14 +426,18 @@
426426
427427
10. **{MrDice_Agent_Name}** - **Crystal structure meta-database search**
428428
- Purpose: Retrieve crystal structure data by coordinating multiple sub-agents:
429-
* `bohrium_public_agent` → for Bohrium Public database (formula, elements, space group, atom counts, band gap, formation energy)
430-
* `optimade_agent` → for OPTIMADE-compliant providers (broad, logic filters, space-group, band-gap queries)
429+
* `bohrium_public_agent` → Bohrium Public database (includes Materials Project / MP; supports formula, elements, space group, atom counts, band gap, formation energy)
430+
* `optimade_agent` → OPTIMADE-compliant providers (broad coverage, complex logic filters, space-group, band-gap queries)
431+
* `openlam_agent` → OpenLAM internal database (formula, energy range, submission time filters)
432+
* `mofdb_agent` → MOFdb (Metal-Organic Frameworks; queries by MOFid, MOFkey, name, database source, void fraction, pore sizes, surface area)
431433
- By default, MrDice analyzes the query and selects the **most suitable sub-agent** to handle it.
432-
- If multiple agents are clearly required by user(e.g., different filters span different capabilities), MrDice executes them **sequentially** and merges results.
434+
- If multiple sub-agents of MrDice are clearly required by user(e.g., different filters span different capabilities), MrDice executes them **sequentially** and merges results.
435+
- MrDice's Execution *does not require user confirmation* — once a valid query is identified, MrDice immediately dispatches the appropriate sub-agent(s) and runs.
433436
- Capabilities:
434437
- Space group, atom count, band gap, formation energy queries (Bohrium Public)
435438
- Element/space-group/band-gap/logic-based queries (OPTIMADE)
436439
- Formula-based, energy-based, time-based queries (OpenLAM)
440+
- MOF queries by id/key/name, database source, or pore/surface metrics (MOFdb)
437441
- Unified Markdown table with merged results
438442
439443
## RESPONSE FORMAT

0 commit comments

Comments
 (0)