SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2310.09168 · EMNLP · 2023

EXPLORE-INSTRUCT: Enhancing Domain-Specific Instruction Coverage through Active Exploration

Shuming Shi, Tao Yang, Xiaojun Quan, Fanqi Wan, Xinting Huang, Wei Bi

arXiv · PDF · Open in the Atlas

Code that ran

11 of 13 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 1 has no contract verdict; 8 failures of our instrument; 2 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2310.09168.json · badge: /api/ran/2310.09168.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
fanqiwan/Explore-Instruct canonical (classifier label)
classifier basis: census
11 ran · 2 no recorded run
FunctionStatusWhere it lives
atoi Ran
ran, honoured the contract we drafted
fanqiwan/Explore-Instruct/train/zero_to_fp32.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from harshmaru7/DilatedConv, is pointer only (licence: NONE) · get_code("6dbf1b2a5b901370")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from harshmaru7/DilatedConv, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

dispatch_openai_requests Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/eval/chatgpt_score.py
code served (permissive licence) · get_code("a756303ae2edaf62")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import openai
import asyncio
from typing import Any

# Mock the openai module since we can't make real API calls
class MockChatCompletion:
    @staticmethod
    async def acreate(model: str, messages: list[dict[str, Any]], temperature: float, max_tokens: int) -> str:
        # Simulate an async API response
        await asyncio.sleep(0.01)
        return f"Mock response for model {model}"

# Replace the openai.ChatCompletion with our mock
openai.ChatCompletion = MockChatCompletion

# Define the arguments for dispatch_openai_requests
ARGS = {
    "messages_list": [
        [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "What is 2+2?"}
        ],
        [
            {"role": "system", "content": "You are a helpful assistant."},
            {"role": "user", "content": "What is 3+3?"}
        ]
    ],
    "model": "gpt-3.5-turbo",
    "temperature": 0.7,
    "max_tokens": 100
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
dispatch_openai_requests Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/eval/chatgpt_generate.py
code served (permissive licence) · get_code("54798b37bb34f36c")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned coroutine. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import asyncio
from typing import Any
from unittest.mock import AsyncMock, MagicMock
import openai

# Mock the openai module to avoid actual API calls
openai.ChatCompletion = MagicMock()

# Create a mock async function for acreate
async def mock_acreate(**kwargs):
    return {"choices": [{"message": {"content": "Mock response"}}]}

openai.ChatCompletion.acreate = mock_acreate

# Construct valid arguments
messages_list = [
    [
        {"role": "user", "content": "Hello, how are you?"},
        {"role": "assistant", "content": "I'm doing well, thank you!"}
    ],
    [
        {"role": "user", "content": "What is the capital of France?"},
        {"role": "assistant", "content": "The capital of France is Paris."}
    ]
]

model = "gpt-3.5-turbo"
temperature = 0.7
max_tokens = 100

ARGS = {
    "messages_list": messages_list,
    "model": model,
    "temperature": temperature,
    "max_tokens": max_tokens
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
openai — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type coroutine — a coroutine output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a coroutine output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
find_word_in_string Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/generate_instruction.py
code served (permissive licence) · get_code("8ca6a5f9f77053c2")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned Match. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

# The function find_word_in_string takes two parameters:
# w: a word (string) to search for
# s: a string to search in
# It uses re.compile with word boundary matching and case-insensitive flag

ARGS = {
    "w": "hello",
    "s": "Hello world, this is a test string with HELLO in it"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Match — a Match output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Match output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_completion Ran
ran on a synthesized input
fanqiwan/Explore-Instruct/eval/chatgpt_score.py
code served (permissive licence) · get_code("b9b91448d55793d7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import asyncio
from unittest.mock import Mock, AsyncMock, patch

# Set random seed for reproducibility
torch.manual_seed(0)

# Create mock messages_list - a list of lists of dicts
# Each inner list represents a conversation (list of messages)
# Each message is a dict with "role" and "content" keys
messages_list = [
    [
        {"role": "user", "content": "What is 2+2?"},
        {"role": "assistant", "content": "4"}
    ],
    [
        {"role": "user", "content": "What is the capital of France?"},
        {"role": "assistant", "content": "Paris"}
    ]
]

# Model name
model = "gpt-3.5-turbo"

# Temperature for sampling
temperature = 0.7

# Define ARGS dictionary with all parameters for get_completion
ARGS = {
    "messages_list": messages_list,
    "model": model,
    "temperature": temperature
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, openai, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_json_list Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/eval/chatgpt_score.py
code served (permissive licence) · get_code("5d17b604c968b41d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import json
import os
import tempfile

# Create a temporary file with JSONL content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write some sample JSONL data
with open(temp_file, 'w') as f:
    f.write(json.dumps({"key1": "value1", "key2": 42}) + "\n")
    f.write(json.dumps({"key1": "value2", "key2": 43}) + "\n")
    f.write(json.dumps({"key1": "value3", "key2": 44}) + "\n")

ARGS = {
    "file_path": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_json_list Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/eval/chatgpt_generate.py
code served (permissive licence) · get_code("76f57c5b5180ce60")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import json
import tempfile

# Create a temporary directory and file with JSONL content
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.jsonl")

# Write some test JSONL data
test_data = [
    {"id": 1, "text": "hello world"},
    {"id": 2, "text": "foo bar"},
    {"id": 3, "text": "test data"}
]

with open(temp_file, 'w') as f:
    for item in test_data:
        f.write(json.dumps(item) + '\n')

ARGS = {
    "file_path": temp_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_model_state_file Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/train/zero_to_fp32.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from rucaibox/lc-rec, is pointer only (licence: NONE) · get_code("3a53f3109825e747")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from rucaibox/lc-rec, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

is_equiv Ran
ran, violated the contract we drafted
fanqiwan/Explore-Instruct/eval/auto_eval/math/math_equivalence.py
code served (permissive licence) · get_code("20063c675d638a77")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned bool, ndim 0, dtype family float, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

ARGS = {
    'str1': '\\frac{1}{2}',
    'str2': '0.5',
    'verbose': False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type bool, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
jload Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/train/utils.py
code served (permissive licence) · get_code("d07d04439cd1d44f")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import io
import json
import tempfile
import os

# Create a temporary JSON file with test data
temp_dir = tempfile.mkdtemp()
temp_file = os.path.join(temp_dir, "test.json")

test_data = {
    "key1": "value1",
    "key2": [1, 2, 3],
    "key3": {"nested": "dict"}
}

with open(temp_file, 'w') as f:
    json.dump(test_data, f)

# Define ARGS with the file path
ARGS = {
    "f": temp_file,
    "mode": "r"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
natural_keys Ran
ran; our contract draft was wrong, not the code
fanqiwan/Explore-Instruct/train/zero_to_fp32.py
code served (permissive licence) · get_code("7052cf0436949e37")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned list, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import re

def atoi(text):
    return int(text) if text.isdigit() else text

def natural_keys(text):
    """
    alist.sort(key=natural_keys) sorts in human order
    http://nedbatchelder.com/blog/200712/human_sorting.html
    (See Toothy's implementation in the comments)
    """
    return [atoi(c) for c in re.split('(\\d+)', text)]

# The function takes a single parameter: text (a string)
# It uses string methods: isdigit(), re.split()
# It returns a list of mixed ints and strings

ARGS = {
    "text": "file123name456.txt"
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, dtype family float — a list output has no array shape of its own; none is stated
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_completion Not yet run
unverified (harvested, no recorded run)
fanqiwan/Explore-Instruct/eval/chatgpt_generate.py
code served (permissive licence) · get_code("10d36e6036039fa6")
How it ran

no invocation recorded.

get_model_answers Not yet run
unverified (harvested, no recorded run)
fanqiwan/Explore-Instruct/eval/generate.py
code served (permissive licence) · get_code("e277401df718baca")
How it ran

no invocation recorded.

Also present in other papers' code

Of 13 samples lifted from this paper's linked repositories, 13 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 8 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 3 the same month, 8 later) and 3 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
jload 46 other papers
11 dated earlier, 2 the same month, 33 later
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
2305.12870 (2023-05)
Lion: Adversarial Distillation of Proprietary Large Language Models
2305.13068 (2023-05)
Making Language Models Better Tool Learners with Execution Feedback
and 43 more not named here
atoi 13 other papers
6 dated earlier, 7 later
1511.07122 (2015-11)
Multi-Scale Context Aggregation by Dilated Convolutions
1908.03706 (2019-08)
Exploiting temporal consistency for real-time video depth estimation
2104.08773 (2021-04)
Cross-Task Generalization via Natural Language Crowdsourcing Instructions
and 10 more not named here
natural_keys 12 other papers
5 dated earlier, 7 later
1511.07122 (2015-11)
Multi-Scale Context Aggregation by Dilated Convolutions
1908.03706 (2019-08)
Exploiting temporal consistency for real-time video depth estimation
2203.03339 (2022-03)
L2CS-Net: Fine-Grained Gaze Estimation in Unconstrained Environments
and 9 more not named here
find_word_in_string 11 other papers
4 dated earlier, 6 later, 1 same year, order not determinable
2212.10560 (2022-12)
SELF-INSTRUCT: Aligning Language Models with Self-Generated Instructions
2023.findings-emnlp.836 (2023 (year only))
Ensemble-Instruct: Generating Instruction-Tuning Data with a Heterogeneous Mixture of LMs
2302.13971 (2023-02)
LLaMA: Open and Efficient Foundation Language Models
and 8 more not named here
is_equiv 11 other papers
1 the same month, 10 later
2310.05914 (2023-10)
NEFTune: Noisy Embeddings Improve Instruction Finetuning
2024.findings-emnlp.407 (2024 (year only))
MultiAgent Collaboration Attack: Investigating Adversarial Attacks in Large Language Model Collaborations via Debate
2402.05120 (2024-02)
More Agents Is All You Need
and 8 more not named here
get_model_state_file 5 other papers
1 dated earlier, 4 later
2308.14034 (2023-08)
Confucius: Iterative Tool Learning from Introspection Feedback by Easy-to-Difficult Curriculum
2311.04072 (2023-11)
Beyond Imitation: Leveraging Fine-grained Quality Signals for Alignment
2311.09049 (2023-11)
Adapting Large Language Models by Integrating Collaborative Semantics for Recommendation
and 2 more not named here
get_json_list 4 other papers
1 the same month, 3 later
2310.20410 (2023-10)
FollowBench: A Multi-level Fine-grained Constraints Following Benchmark for Large Language Models
2024.findings-acl.341 (2024 (year only))
Phased Instruction Fine-Tuning for Large Language Models
2401.10768 (2024-01)
Knowledge Verification to Nip Hallucination in the Bud
and 1 more not named here
dispatch_openai_requests 1 other paper
1 later
2401.10768 (2024-01)
Knowledge Verification to Nip Hallucination in the Bud

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Instruction-tuning can be substantially optimized through enhanced diversity, resulting in models capable of handling a broader spectrum of tasks. However, existing data employed for such tuning often exhibit an inadequate coverage of individual domains, limiting the scope for nuanced comprehension and interactions within these areas. To address this deficiency, we propose EXPLORE-INSTRUCT, a novel approach to enhance the data coverage to be used in domain-specific instruction-tuning through active exploration via Large Language Models (LLMs). Built upon representative domain use cases, EXPLORE-INSTRUCT explores a multitude of variations or possibilities by implementing a search algorithm to obtain diversified and domain-focused instruction-tuning data. Our data-centric analysis validates the effectiveness of this proposed approach in improving domain-specific instruction coverage. Moreover, our model's performance demonstrates considerable advancements over multiple baselines, including those utilizing domainspecific data enhancement. Our findings offer a promising opportunity to improve instruction coverage, especially in domain-specific contexts, thereby advancing the development of adaptable language models. Our code, model weights, and data are public at https:// github.com/fanqiwan/Explore-Instruct.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2310.09168")
get_code_for_paper("2310.09168")
have("2310.09168")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2310.09168.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2310.09168.svg)](https://syntology.ai/paper/2310.09168)

Connect an agent — have() is free.