SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2305.14766 · 2023

Allies: Prompting Large Language Model with Beam Search

arXiv · PDF · Open in the Atlas

Code that ran

5 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; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 1 failure of our instrument; 8 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/2305.14766.json · badge: /api/ran/2305.14766.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
microsoft/simxns canonical (classifier label)
classifier basis: census
5 ran · 8 no recorded run
FunctionStatusWhere it lives
extract_floats_from_string Ran
ran on a synthesized input
microsoft/simxns/ALLIES/tools.py
code served (permissive licence) · get_code("860e0ecfd5d3c0c9")
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 extract_floats_from_string(input_string):
    pattern = '[-+]?\\d*\\.\\d+|\\d+'
    floats = re.findall(pattern, input_string)
    return [float(num) for num in floats]

ARGS = {
    'input_string': "The values are 3.14, -2.5, 42, +1.618, and 0.001 in this string."
}
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_question_embeddings Ran
ran on a synthesized input
microsoft/simxns/ALLIES/retrieval_utils.py
code served (permissive licence) · get_code("26455f41307d3f5c")
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 ndarray, ndim 2, dtype family float, shape (1, 8) 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.

import torch
import torch.nn as nn

torch.manual_seed(0)

# Stand-in tokenizer class
class MockTokenizer:
    def encode(self, text):
        # Return a simple token sequence
        # Length 5 to match input_ids dimension
        return [101, 2054, 2003, 1045, 102]

# Stand-in model class
class MockModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.embedding = nn.Embedding(1000, 8)
    
    def query_emb(self, mode, input_ids, attention_mask):
        # mode is 'dual_encoder'
        # input_ids shape: (batch, seq_len) -> (1, 5)
        # attention_mask shape: (batch, seq_len) -> (1, 5)
        
        # Return embeddings and two dummy tensors
        batch_size = input_ids.shape[0]
        embs = torch.randn(batch_size, 8)  # (1, 8)
        dummy1 = torch.randn(batch_size, 4)
        dummy2 = torch.randn(batch_size, 4)
        
        return embs, dummy1, dummy2
    
    def eval(self):
        super().eval()
        return self

# Stand-in args class
class MockArgs:
    def __init__(self):
        self.device = 'cpu'

ARGS = {
    'questions': "What is this?",
    'tokenizer': MockTokenizer(),
    'model': MockModel(),
    'args': MockArgs()
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (1, 8) — shape (1, 8) 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
load_data Ran
ran on a synthesized input
microsoft/simxns/CAPSTONE/models/generate_query.py
code served (permissive licence) · get_code("3d84e929685d7198")
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 2, 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 tempfile
import os

# Create a temporary directory and file with test data
temp_dir = tempfile.mkdtemp()
corpus_path = os.path.join(temp_dir, 'test_corpus.jsonl')

# Write test data in JSONL format
test_data = [
    {'_id': '1', 'text': 'This is the first document text.', 'title': 'Document 1'},
    {'_id': '2', 'text': 'This is the second document text.', 'title': 'Document 2'},
    {'_id': '3', 'text': 'This is the third document text.', 'title': 'Document 3'},
]

with open(corpus_path, 'w', encoding='utf-8') as fw:
    for doc in test_data:
        fw.write(json.dumps(doc) + '\n')

ARGS = {
    'corpus_path': corpus_path
}
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 2, 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
readfiles Ran
ran; our contract draft was wrong, not the code
microsoft/simxns/ALLIES/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from wyu97/GenRead, is pointer only (licence: NONE) · get_code("ed1a7cdd6a385a75")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from wyu97/GenRead, 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.

sparse_retrieval Ran
ran on a synthesized input
microsoft/simxns/ALLIES/utils.py
code served (permissive licence) · get_code("314a75c29803d7fd")
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
from unittest.mock import Mock, MagicMock

torch.manual_seed(0)

# Create mock Lucene Field objects
class MockField:
    def __init__(self, value):
        self.value = value
    
    def stringValue(self):
        return self.value

# Create mock Lucene Document
class MockLuceneDocument:
    def __init__(self, fields):
        self.fields = fields
    
    def getFields(self):
        return self.fields

# Create mock Hit object
class MockHit:
    def __init__(self, lucene_document):
        self.lucene_document = lucene_document

# Create mock searcher
class MockSearcher:
    def __init__(self):
        # Create some mock documents with fields
        doc1 = MockLuceneDocument([
            MockField("field0_value1"),
            MockField("field1_value1")
        ])
        doc2 = MockLuceneDocument([
            MockField("field0_value2"),
            MockField("field1_value2")
        ])
        doc3 = MockLuceneDocument([
            MockField("field0_value3"),
            MockField("field1_value3")
        ])
        
        self.hits = [
            MockHit(doc1),
            MockHit(doc2),
            MockHit(doc3)
        ]
    
    def search(self, query):
        return self.hits

# Set up arguments
searcher_sparse = MockSearcher()
query = "test query"
top_K = 2

ARGS = {
    "searcher_sparse": searcher_sparse,
    "query": query,
    "top_K": top_K
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, 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
answer_with_gen Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/ALLIES/tools.py
code served (permissive licence) · get_code("7d94e4547cbd3c27")
How it ran

no invocation recorded.

embed_passages Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/CAPSTONE/models/co_training_generate_new_train_wiki.py
code served (permissive licence) · get_code("9ae939ed24cee1da")
How it ran

no invocation recorded.

gen_background Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/ALLIES/tools.py
code served (permissive licence) · get_code("bb95e483083da720")
How it ran

no invocation recorded.

generate Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/CAPSTONE/models/generate_query.py
code served (permissive licence) · get_code("316ed99ac8be6d85")
How it ran

no invocation recorded.

load_states_from_checkpoint Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/ALLIES/retrieval_utils.py
code served (permissive licence) · get_code("4ee31e53b22a4487")
How it ran

no invocation recorded.

load_tf_weights_in_bert Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/ALLIES/modeling_bert.py
pointer only (licence: MIT); the stored copy get_code serves, from hqsiswiliam/lapdog, is pointer only (licence: NONE) · get_code("d009b630f4496e64")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from hqsiswiliam/lapdog, 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. No invocation recorded.

reform_out Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/CAPSTONE/models/co_training_generate_new_train_wiki.py
code served (permissive licence) · get_code("b3b424db5be9b55c")
How it ran

no invocation recorded.

retrieval Not yet run
unverified (harvested, no recorded run)
microsoft/simxns/ALLIES/utils.py
code served (permissive licence) · get_code("e6b0e72e41150f0f")
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 13 distinct functions with an identity, 2 are also present in other papers whose code we hold (2 with at least one paper dated earlier, 1 the same month, 2 later) and 11 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
load_tf_weights_in_bert 14 other papers
5 dated earlier, 1 the same month, 7 later, 1 same year, order not determinable
2112.02505 (2021-12)
Causal Distillation for Language Models
2022.findings-emnlp.24 (2022 (year only))
AssistSR: Task-oriented Video Segment Retrieval for Personal AI Assistant
2206.07699 (2022-06)
Write and Paint: Generative Vision-Language Models are Unified Modal Learners
and 11 more not named here
readfiles 2 other papers
1 dated earlier, 1 later
2209.10063 (2022-09)
Generate rather than Retrieve: Large Language Models are Strong Context Generators
2409.13203 (2024-09)
Neural-Symbolic Collaborative Distillation: Advancing Small Language Models for Complex Reasoning Tasks

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

With the advance of large language models (LLMs), the research field of LLM applications becomes more and more popular and the idea of constructing pipelines to accomplish complex tasks by stacking LLM API calls come true. However, this kind of methods face two limitations: narrow information coverage and low fault tolerance. In this work, we propose a novel method called ALLIES. Given an input query, ALLIES leverages LLMs to iteratively generate new queries related to the original query, enabling an iterative reasoning process. By iteratively refining and expanding the scope of the original query, ALLIES captures and utilizes hidden knowledge that may not be directly obtainable through retrieval. We take zero-shot open-domain question answering (ODQA) as an application scene and evaluate ALLIES on the widely-used benchmarks, such as NQ, WebQ and TriviaQA. The experimental results demonstrate that ALLIES significantly outperforms other zero-shot baselines, indicating its effectiveness in tackling those challenges. Our code is available in https://github.com/microsoft/SimXNS/tree/main/ALLIES.

For agents

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

get_harvested_code_for_paper("2305.14766")
get_code_for_paper("2305.14766")
have("2305.14766")

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

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

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

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

Connect an agent — have() is free.