bulk_retrieval
Defines a tool to retrieve multiple catalog objects at once using a configurable signature, returning JSON for LLM consumption.
What this file does
Defines a tool to retrieve multiple catalog objects at once using a configurable signature, returning JSON for LLM consumption.
When to use it
- When you need to fetch a batch of catalog objects without conversational queries
- When an LLM must select items from a large set of catalog entries
- When you want to return multiple object types in a single API call
Assumes this stack
bulk_retrieval
A retrieval tool that pulls a set of objects from the Alation catalog based on a signature.
Functionality
- Retrieve catalog objects without conversational queries.
- Useful for having an LLM decide which items to use from a larger set.
- Accepts a signature defining which objects and the fields required.
- Returns relevant catalog data in JSON format
- Can return multiple object types in a single response
Usage
# Get tables from a specific datasource
bulk_signature = {
"table": {
"fields_required": ["name", "description", "columns"],
"search_filters": {
"fields": {"ds": [123]} # Specific datasource
},
"limit": 100,
"child_objects": {
"columns": {
"fields": ["name", "data_type", "description"]
}
}
}
}
response = sdk.bulk_retrieval(signature=bulk_signature)
Input Parameters
signature(dict): The configuration controlling which objects and their fieldschat_id(optional, uuid): An existing chat to use. If not provided, a new chat will be created.
Returns
- JSON-formatted response of relevant data products
Shape the SDK to your needs
The SDK's bulk_retrieval tool supports customizing response content using signatures. This powerful feature allows you to specify which fields to include and how to filter the catalog results. For instance:
# Define a signature for searching only tables. Return joins and filters.
signature = {
"table": {
"fields_required": ["name", "title", "description", "common_joins", "common_filters"],
}
}
# Use the signature with your query
response = sdk.bulk_retrieval_tool(
signature=signature
)
For more information about signatures, refer to <a href="https://developer.alation.com/dev/docs/customize-the-aggregated-context-api-calls-with-a-signature" target="blank"> Using Signatures </a>
What's inside
1 code example, 1 input parameter table, 1 return description, 1 link to external signature docs.
Change this for your project
- Replace
123in"ds": [123]with your own datasource ID - Replace field names like
"common_joins"with fields available in your catalog
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Related Documents
Data Retrieval
Downloads UK electricity generation and pricing data from Electric Insights and Energy Charts APIs using the moepy library, then visualises fuel-mix time-series.
Lesson 4: Information Retrieval
Guides building a Flask app that fetches Bitcoin exchange rates from multiple APIs, stores them in SQLite, and displays best rates and historical trends.
Papers
Lists 100+ papers on deep learning for image retrieval and hashing, each with links and brief metadata.
开放领域问答中的密集段落检索
Explains dense passage retrieval for open-domain QA and provides a code template using Simple Transformers to train a DPR model.