liveBook · Manning

Formal language

As explained in Data Analysis with LLMs

A formal language is a language defined by explicit symbols and grammatical rules for expressing structured statements to computational systems.

A formal language lets users express analysis operations in a form that a particular tool can process. Different data-analysis tools may support different query languages, so users often need to learn the language for their tool. section 2.4 section 5.0

A language model can act as a translator: ask a question in plain English, provide the database structure, and have the model produce a formal query for a tool to execute. For example, a table of product reviews can store review IDs, satisfaction flags, and product categories. Check generated queries before running them; they may be inaccurate. section 2.4 section 5.0 section 5.5

How Data Analysis with LLMs covers it

How deep it goes
Explains query translation, database-structure prompts, and query checking, but does not detail language syntax or internals.
Examples
Uses a product-review table with review IDs, satisfaction flags, and product categories as a structured-data example.
What it assumes
Requires no query-language expertise; explains structured data through tables and graphs.
What you can do after
Apply it via a language model to translate a question and database structure into a query, then check the query before execution.
How it connects
Ties formal query languages to natural language, structured data, databases, and SQL.

Also explained in

Compare how 2 books explain formal language →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data Analysis with LLMs. The section links point to the parts of the book it draws on.