LLMs as Computing Platforms

Published on 30 April 2026 | 6 mins to read

I didn't come up with this way of viewing LLMs but I found it useful so I am going to write it down.

Consider the computer...

A computer has capabilities expressed to us as its instruction set. Our job as programmers is to tell the computer what to do in terms of these capabilities.

Writing programs in a way that the computer directly in those terms is difficult so we created an abstraction in the form of high level programming languages.

High level programming languages expose more abstract capabilities to us, but they promise to take our instructions (in terms of those abstract capabilities) and express them in simpler terms that the computer understands.

Indirectly, computers can understand the instructions we write in high level languages. This is done through interpretation and compilation.

So in the end, humans can write in a more abstract way, and computers could still ultimately understand us. Great!

LLMs as translators

Now LLMs expose an even more abstract set of capabilities that can be accessed in plain English. LLMs promise to take our English instructions and express them in a form a computer understands. Like language translators, LLMs do this through interpretation or compilation.

LLMs as interpreters

Let's consider a project I worked on some time ago, Fourwalls. It is an AI-powered housing marketplace. One feature I wanted to implement was the ability to parse Facebook real estate ads written as Facebook posts in natural language, and add them to my database.

Writing a program to perform such as task in any high level language is incredibly difficult. So I decided to write my program in English instead, and use an LLM to execute it. Here is my implementation.

from google import genai
from google.genai import types
import json
import os

SYSTEM_PROMPT = """
You are a real estate data extraction expert. Your task is to analyse social media posts about real estate properties and extract structured property information.

Return the result strictly as a valid JSON array of objects matching this schema:

- title: string (required)
- description: string (optional)
- neighbourhood: string (required)
- city: string (required)
- price: number (required, in RWF)
- bedrooms: integer (optional)
- bathrooms: number (optional)
- interior_size_sqm: integer (optional)
- status: string (one of: "for_sale", "for_rent", "sold", "rented", "off_market")
- property_type: string (one of: "house", "apartment", "condo", "townhouse", "commercial", "land", "other")
- features: array of strings (optional)
- year_built: number (optional)
- lot_size_sqm: number (optional)
- images: array of image URLs (optional)
- facebook_import_id: string (required)

Guidelines:
1. Only include properties with title, neighbourhood, city, and price.
2. Normalise prices: convert formats like “500k” to 500000 and “30M” to 30000000.
3. Translate any Kinyarwanda into English.
4. Generate creative titles and medium-length, persuasive descriptions.
5. Use "Other" for unknown neighbourhoods.
6. If no status is given, infer it based on price: if above 500000 → "for_sale", otherwise → "for_rent".
7. Your response should only be a valid JSON array, even if empty.
8. Do not include any extra explanations, text, or commentary.
9. Use POST_START and POST_END as delimiters for each post.
10. Add any image links under the 'images' field.
11. Each object must include "facebook_import_id" from the original post.
---

Here are some examples to guide you:

Input:
=== POST_START ===
Facebook Import ID: fb_post_001
Selling a lovely 3 bedroom house in Kabeza, Kigali. Spacious compound, indoor kitchen, tiled floors. Going for 65M. DM for more details. 
#HouseForSale
=== POST_END ===

Output:
[
  {
    "title": "Charming 3-Bedroom Home for Sale in Kabeza",
    "description": "This spacious 3-bedroom house in Kabeza features tiled floors, an indoor kitchen, and a large compound perfect for families.",
    "neighbourhood": "Kabeza",
    "city": "Kigali",
    "price": 65000000,
    "bedrooms": 3,
    "status": "for_sale",
    "property_type": "house",
    "features": ["indoor kitchen", "tiled floors", "spacious compound"],
    "facebook_import_id": "fb_post_001"
  }
]

---

Input:
=== POST_START ===
Facebook Import ID: fb_post_002
Igihe cyiza cyo gukodesha! Inzu iri Kimironko, iburiro rinini, douche ya moderne. Price: 400k/month. Wambaza kuri inbox.
=== POST_END ===

Output:
[
  {
    "title": "Modern House for Rent in Kimironko",
    "description": "Enjoy modern comfort in this spacious rental house in Kimironko, featuring a large dining area and a contemporary bathroom.",
    "neighbourhood": "Kimironko",
    "city": "Kigali",
    "price": 400000,
    "status": "for_rent",
    "property_type": "house",
    "features": ["modern bathroom", "large dining area"],
    "facebook_import_id": "fb_post_002"
  }
]

---

Input:
=== POST_START ===
Facebook Import ID: fb_post_003
Prime land in Nyarutarama – 1200 sqm. Ideal for luxury apartments or villas. Selling for 120M Rwf. Contact us now!
=== POST_END ===

Output:
[
  {
    "title": "Prime 1200 sqm Plot for Sale in Nyarutarama",
    "description": "Excellent opportunity to own 1200 square metres of land in the prestigious Nyarutarama area. Perfect for building luxury apartments or villas.",
    "neighbourhood": "Nyarutarama",
    "city": "Kigali",
    "price": 120000000,
    "status": "for_sale",
    "property_type": "land",
    "lot_size_sqm": 1200,
    "features": ["ideal for luxury development"],
    "facebook_import_id": "fb_post_003"
  }
]
"""

client = genai.Client(api_key=os.getenv("GOOGLE_API_KEY"))

async def parse_with_gemini(posts: list) -> list[dict]:
  combined_message = ""
  for post in posts:
    if not post.get("post_text"):
      continue
    combined_message += "\n === POST_START === \n"
    combined_message += "Facebook Import ID: " + post["post_id"] + "\n"
    combined_message += post["post_text"]
    combined_message += "\n === POST_END === \n"

  response = client.models.generate_content(
    model="gemini-2.5-flash",
    config=types.GenerateContentConfig(
      system_instruction=SYSTEM_PROMPT
    ),
    contents=combined_message,
  )

  generated = response.text if hasattr(response, 'text') else str(response)
  try:
    json_output = generated.replace("```json", "").replace("```", "").strip()
    return json.loads(json_output)
  except Exception as e:
    return {"error": "Failed to parse response", "details": str(e)}

Notice, that the parsing logic is actually written in English. So in a sense, I wrote a parser in English and its executed by Gemini. Writing the parser this way had the primary advantage of being a lot easier to do. Other approaches would be too difficult, impossible or impractical. However, this parser a few disadvantages. The first disadvantage of being computational cost. Though I think my computer is quite capable, I can't run LLMs, and by extension this simple parser, on my personal machine. The other disadvantage is that it's outputs are not guaranteed to be correct. LLMs make mistakes, therefore the output parsed might be incorrect.

LLMs as compilers

Another use case for LLMs is as compilers. As compilers, LLMs take your natural language prompt and convert it into lower level code such as JavaScript.

Here's an example:

I gave ChatGPT the prompt "Help me write a JavaScript function (isValidEmail) that takes an email address as a string and returns a boolean indicating whether it is valid or not."

And ChatGPT produced the following code snippet:

function isValidEmail(email) {
  const emailRegex =
    /^[^\s@]+@[^\s@]+\.[^\s@]+$/;

  return emailRegex.test(email);
}

So ChatGPT took my instructions in natural language and converted them into JavaScript, which the computer indirectly understands.

Conclusion

We can view LLMs as a new platform to write programs for. The programs we write are in natural language. They are either executed directly by the LLM or compiled to a lower level language like JavaScript. And, yes, I chuckled at the idea of calling JavaScript lower level. Like other platforms we write code for, LLMs are tools. And we should understand the strengths and weaknesses of our tools so that we use them effectively.

I think I will follow this up with a more in-depth discussion about strengths and weaknesses of LLMs as computing platforms.