AI as a Universal Information Interface

Posted: 06 May 2025. Last modified on 03-Jun-25.

This article will take about 4 minutes to read.



The advent of LLMs allows us to get access to vast quantities of information that may or may not be correct. It’s up to us to sort through that information to make sure that it’s been verified for accuracy. But the information it provides is mostly correct. The chance that it is correct improves if the generated text does not require much context or reasoning.

One use case for AI that requires very little context at all is returning structured data, as if it were an API. As long as a human is able to review the output for accuracy, that means that a completion API is able to stand in for just about any read-only API out there.

Unlike specialized APIs that perform one function, a completion API can act as a universal interface to a wide range of tasks and services—effectively serving as a stand-in for many other specialized APIs. This is possible because it:

  1. Has already absorbed unstructured web data: These models have been trained on massive datasets scraped from the internet, including technical documentation, web apps, APIs, and natural language descriptions. This means they have latent knowledge of how thousands of APIs and domains work, even without direct integration.
  2. Can dynamically structure output: Unlike fixed-function APIs, a Completions API can generate outputs in a variety of structured formats—JSON, XML, Markdown, SQL, HTML, even proprietary data schemas—based solely on the prompt.
  3. Eliminates rigid integration: You don’t need to implement a different client, token, or SDK for each new API. Instead, you pass natural-language or programmatic prompts to a single endpoint, and get intelligent responses across domains. In this case, the sum is greater than its parts, because new, interdisciplinary information can be returned.
Task Traditional API Call Completions API Prompt
Currency conversion Use a Forex API “Convert 100 USD to EUR using today’s exchange rate.”
Data extraction Use a scraper or parsing tool “Extract all emails and phone numbers from this text.”
Resume screening Use HR software “Summarize the candidate’s qualifications for a tech role.”
Medical symptoms check Use a symptom-checker API “Given these symptoms, what could be the possible causes?”

Limitations to Keep in Mind

Overcoming those limitations - AI as the Universal Adapter

A completion API can function as a wrapper or front-end to other bespoke APIs by:

  1. Interpreting natural language requests
  2. Translating them into structured API calls
  3. Processing the responses back into user-friendly formats

For example, a simple natural language query like “How many orders did we ship to Germany last week?” could be transformed into a structured API call like this:

User Input (Natural Language)
→ "How many orders did we ship to Germany last week?"

Completions API (NLP Translation Layer)
→ Parses and interprets the intent, entities, and timeframes.
→ Outputs a structured API call:

{
  "endpoint": "/orders",
  "method": "GET",
  "params": {
    "country": "Germany",
    "date_range": "2025-04-28 to 2025-05-04"
  }
}

Backend API (Your Custom Logic)
→ Executes the call and returns raw data.

Completions API (Response Interpretation)
→ Converts structured API response into natural language:
"We shipped 153 orders to Germany between April 28 and May 4."

Benefits of This Wrapper Approach

Example Use Cases

Domain Natural Language Query Backend Function Triggered
Logistics “Track my last shipment to Canada” GET /shipments?destination=Canada&status=latest
HR/Recruiting “List applicants with Java and 5+ years experience” POST /filter_candidates
Finance “What was the revenue last quarter?” GET /revenue?period=Q1-2025
Healthcare “Show me patients with elevated blood pressure” POST /patients/filter

Technical Implementation Hints

Use the Completions API to output structured JSON (via schema-based prompting or function-calling syntax).

Use a middleware layer that:

Bonus: Augmented Interaction

You can also support follow-up queries (like “What about France?”) by keeping conversational context and allowing the model to generate delta queries or comparisons automatically.