Exercises

ex-sp-ch36-01

Easy

Call an LLM API to summarize a wireless paper abstract in 3 bullet points. Parse the response as JSON.

ex-sp-ch36-02

Easy

Count the tokens in 5 different prompts using tiktoken. Compare zero-shot vs few-shot token usage.

ex-sp-ch36-03

Easy

Write a system prompt that makes the LLM respond only in LaTeX mathematical notation.

ex-sp-ch36-04

Easy

Implement exponential backoff retry logic for API calls using the tenacity library.

ex-sp-ch36-05

Medium

Design a few-shot prompt for classifying wireless papers into 6 categories. Evaluate accuracy on 20 test papers.

ex-sp-ch36-06

Medium

Implement chain-of-thought prompting for computing link budget calculations. Compare accuracy with direct prompting.

ex-sp-ch36-07

Medium

Build a tool-use system where the LLM can call a BER simulation function and interpret the results.

ex-sp-ch36-08

Medium

Build a simple RAG system using FAISS and sentence-transformers over 50 paper abstracts.

ex-sp-ch36-09

Medium

Compare the outputs of 3 different LLMs (GPT-4, Claude, LLaMA) on the same wireless engineering question.

ex-sp-ch36-10

Hard

Build a multi-turn conversation system that maintains context across API calls for debugging simulation code.

ex-sp-ch36-11

Hard

Implement RAG with hybrid search (combining BM25 keyword search with dense embedding search) and evaluate retrieval quality.

ex-sp-ch36-12

Hard

Build an LLM agent that can search arXiv, download papers, extract key results, and generate comparison tables.

ex-sp-ch36-13

Hard

Set up local inference with Ollama and benchmark throughput, latency, and quality against cloud APIs.

ex-sp-ch36-14

Challenge

Build a complete research assistant that uses RAG, tool use, and multi-turn conversation to help design a MIMO simulation.

ex-sp-ch36-15

Challenge

Implement prompt caching and measure cost savings over 1000 API calls with shared system prompts.