1. University MCA (AI/ML) Semester 2
  2. CAB206
  3. Unit 5

CAB206 · Unit 5: AI for business intelligence

Generative AI and augmented analytics in BI

9 practice questions

Key points

  • Augmented analytics automates prep, insights and NL queries
  • Text-to-SQL needs schema and a semantic layer
  • Hallucinated columns fail at the database; show the error
  • Read-only credentials and least privilege
  • Evaluate by execution accuracy, not text match

Augmented analytics uses machine learning and natural language to automate parts of the analytics workflow: data preparation, automatic insight discovery ("sales dropped in the South because of returns"), forecasting, and natural-language querying ("total sales for North last quarter?"). Vendor assistants (for example Copilot features in BI tools) add generative-AI chat on top of the data model.

Text-to-SQL. An LLM turns a business question into SQL, which the database executes. It is only as good as the schema, definitions and examples it is given.

Risks and controls

  • Hallucination: the model may invent tables or columns. A validating engine rejects them (for example a no such column error), and the pipeline should show the error or retry, never a made-up number.
  • Ambiguous terms: "revenue" may mean gross or net of returns. With sales of 1,000 and returns of 150, gross is 1,000 and net is 850. Ground the model in a semantic layer of agreed definitions.
  • Arithmetic: have the database compute the numbers; do not let the model do the maths in text.
  • Safety: run generated queries under read-only credentials with least privilege. In a read-only database a generated DROP TABLE fails with a read-only error. Also enforce row-level security and timeouts.
  • Prompt injection: instructions hidden in data or documents can steer the model; treat retrieved content as untrusted.
  • Privacy: do not send sensitive rows to external services without approval and agreements.
  • Evaluation: judge by execution accuracy (does the query return the same result as a known-correct query), not text match. Two differently written queries can both be right.

RAG (retrieval-augmented generation) retrieves relevant documents (metric definitions, policies) and gives them to the model so answers are grounded. Keep a human in the loop for decisions of consequence and show the generated SQL so analysts can audit it.

Try two questions

Question 1 · Tier 1, Recall

What is an LLM 'hallucination' in a text-to-SQL setting?

  1. The model invents tables, columns or facts that do not exist
  2. The model refuses to answer any question that involves a join
  3. The database runs noticeably slower than normal during weekends
  4. The report colours change after every scheduled refresh runs
Show the answer

A. Hallucination means fabricated content; in SQL it often appears as references to non-existent columns.

Question 2 · Tier 2, Understand

Which approach best grounds an LLM assistant in the company's agreed definitions of metrics such as 'net revenue'?

  1. Letting the model guess the meaning from the column names alone
  2. Training the model on public web pages about general business topics
  3. Hiding the schema from the model so it cannot be misled by it
  4. Supplying a semantic layer and retrieved metric definitions
Show the answer

D. A semantic layer plus retrieval (RAG) gives the model the official definitions, reducing wrong interpretations.