### Mephisto Quick Start Example Source: https://github.com/zechangsun/mephisto/blob/latest/README.md A comprehensive example demonstrating the Mephisto workflow: configuring paths and LLM, loading astronomical data, running inference with an agent, and saving the results. ```python import os from astropy.table import Table from mephisto.dataloader import SimpleDataLoader from mephisto.agent import Mephisto # --- 1. Configuration --- # Set path to your local CIGALE installation and working directory os.environ['CIGALE_PATH'] = '/path/to/your/cigale' os.environ['MEPHISTO_WORKDIR'] = './mephisto_output' # Configure the LLM (Example using CustomLLM with SiliconFlow DeepSeek-V3) llm_config = { "base_module": "mephisto.llm", "name": "CustomLLM", "kwargs": { "api_key": "YOUR_API_KEY", "model": "deepseek-ai/DeepSeek-V3", "temperature": 0.7 } } # --- 2. Load Data --- # Read the provided COSMOS catalog table = Table.read('data/cosmos.csv') loader = SimpleDataLoader(table=table, batch_size=1) galaxy_state = loader[0] # Get the first galaxy in the catalog # --- 3. Run Inference --- # Initialize agent with built-in knowledge base agent = Mephisto( name="Galaxy_Fitter", llm_config=llm_config, knowledge_path="data/knowledge.json" ) # Explore SED parameter space using Breadth-First Search result_tree = agent.inference( state=galaxy_state, search_mode="BFS", max_step=5 ) # --- 4. Save Results --- result_tree.save("fitting_results/") ``` -------------------------------- ### Install Mephisto and Dependencies Source: https://github.com/zechangsun/mephisto/blob/latest/README.md Clone the Mephisto repository and install its Python dependencies using pip. Ensure Python 3.10+ and CIGALE are installed beforehand. ```bash # Clone the repository git clone https://github.com/ZechangSun/mephisto.git cd mephisto # Install Python dependencies pip install -e . ``` -------------------------------- ### Mephisto Repository Structure Source: https://github.com/zechangsun/mephisto/blob/latest/README.md Overview of the Mephisto project's directory structure, outlining the purpose of key subdirectories and files. ```text mephisto/ ├── mephisto/ # Core source code │ ├── agent.py # Core orchestrator + agent logic (ZeroShotAgent, AgentWithKnowledge) │ ├── dataloader.py # Astronomical data ingestion & processing (SimpleDataLoader) │ ├── state.py # Data models (State, Photometry, CigaleConfig) │ ├── explore.py # Exploration strategies (random sampling, etc.) │ ├── llm.py # LLM provider wrapper (CustomLLM for LangChain integration) │ ├── prompts.py # LLM prompt templates │ ├── utils.py # Utilities (logging, retries, search tree structures) │ └── sed/ # CIGALE interface package │ ├── sed.py # CIGALE configuration generation & execution │ ├── catalogues.py # Catalog handling utilities │ └── misc/ # Helper modules for CIGALE integration ├── data/ # Datasets from the associated publication │ ├── cosmos.csv # COSMOS field photometric catalog (multi-band fluxes + redshifts) │ ├── little_red_dot.csv # High-redshift "Little Red Dot" galaxy sample │ └── knowledge.json # Pre-trained knowledge base of successful modeling strategies ├── LICENSE # License file └── setup.py # Python package installation ``` -------------------------------- ### Publication Citation (Wang et al. 2025) Source: https://github.com/zechangsun/mephisto/blob/latest/README.md BibTeX entry for the publication 'Luminous mid-IR-selected type 2 quasars at cosmic noon in SDSS Stripe 82 ─ I. Selection, composite photometry, and spectral energy distributions' by Wang et al., which used Mephisto. ```bibtex @ARTICLE{2025MNRAS.539.1562W, author = {{Wang}, Ben and {Hennawi}, Joseph F. and {Cai}, Zheng and {Richards}, Gordon T. and {Schindler}, Jan-Torge and et al.}, title = "{Luminous mid-IR-selected type 2 quasars at cosmic noon in SDSS Stripe 82 ─ I. Selection, composite photometry, and spectral energy distributions}", journal = {Monthly Notices of the Royal Astronomical Society}, keywords = {galaxies: high-redshift, quasars: emission lines, quasars: general, quasars: supermassive black holes, infrared: galaxies, Astrophysics of Galaxies, Cosmology and Nongalactic Astrophysics}, year = 2025, month = may, volume = {539}, number = {2}, pages = {1562-1594}, doi = {10.1093/mnras/staf574}, archivePrefix = {arXiv}, eprint = {2501.14026}, primaryClass = {astro-ph.GA}, adsurl = {https://ui.adsabs.harvard.edu/abs/2025MNRAS.539.1562W}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } ``` -------------------------------- ### Publication Citation (Wei et al. 2026) Source: https://github.com/zechangsun/mephisto/blob/latest/README.md BibTeX entry for the publication 'Zangetsu: A Candidate Isolated, Quiescent, and Backsplash Ultra-diffuse Galaxy in the COSMOS Field' by Wei et al., which used Mephisto. ```bibtex @ARTICLE{2026ApJ...997...32W, author = {{Wei}, Leyao and {Huang}, Song and {Li}, Jiaxuan and {Sun}, Zechang and {Li}, Mingyu and et al.}, title = "{Zangetsu: A Candidate Isolated, Quiescent, and Backsplash Ultra-diffuse Galaxy in the COSMOS Field}", journal = {The Astrophysical Journal}, keywords = {Dwarf galaxies, Low surface brightness galaxies, Galaxy photometry, Galaxy structure, 416, 940, 611, 622, Astrophysics of Galaxies}, year = 2026, month = jan, volume = {997}, number = {1}, eid = {32}, pages = {32}, doi = {10.3847/1538-4357/ae20f5}, archivePrefix = {arXiv}, eprint = {2505.14073}, primaryClass = {astro-ph.GA}, adsurl = {https://ui.adsabs.harvard.edu/abs/2026ApJ...997...32W}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } ``` -------------------------------- ### Main Mephisto Paper Citation Source: https://github.com/zechangsun/mephisto/blob/latest/README.md BibTeX entry for the main Mephisto paper. Use this when citing the primary publication of the Mephisto project. ```bibtex @ARTICLE{2025arXiv251008354S, author = {{Sun}, Zechang and {Ting}, Yuan-Sen and {Liang}, Yaobo and {Duan}, Nan and {Huang}, Song and et al.}, title = "{Mephisto: Self-Improving Large Language Model-Based Agents for Automated Interpretation of Multi-band Galaxy Observations}", journal = {arXiv e-prints}, keywords = {Instrumentation and Methods for Astrophysics, Astrophysics of Galaxies}, year = 2025, month = oct, eid = {arXiv:2510.08354}, pages = {arXiv:2510.08354}, doi = {10.48550/arXiv.2510.08354}, archivePrefix = {arXiv}, eprint = {2510.08354}, primaryClass = {astro-ph.IM}, adsurl = {https://ui.adsabs.harvard.edu/abs/2025arXiv251008354S}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } ``` -------------------------------- ### Mephisto Conference Proceedings Citation Source: https://github.com/zechangsun/mephisto/blob/latest/README.md BibTeX entry for the Mephisto conference proceedings. Use this when citing the conference publication. ```bibtex @ARTICLE{2024arXiv240914807S, author = {{Sun}, Zechang and {Ting}, Yuan-Sen and {Liang}, Yaobo and {Duan}, Nan and {Huang}, Song and et al.}, title = "{Interpreting Multi-band Galaxy Observations with Large Language Model-Based Agents}", journal = {arXiv e-prints}, keywords = {Instrumentation and Methods for Astrophysics, Astrophysics of Galaxies}, year = 2024, month = sep, eid = {arXiv:2409.14807}, pages = {arXiv:2409.14807}, doi = {10.48550/arXiv.2409.14807}, archivePrefix = {arXiv}, eprint = {2409.14807}, primaryClass = {astro-ph.IM}, adsurl = {https://ui.adsabs.harvard.edu/abs/2024arXiv240914807S}, adsnote = {Provided by the SAO/NASA Astrophysics Data System} } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.