Imagen de fondo
Data Science

From Text to Data: Language Models You Can Trust

Learn how language models read text, how to use them to extract information and generate answers, and how to know when to trust them.

clock_icon
17.5h (5 days)
price_icon_white
people_icon_white
Face-to-face
language_icon
English
Next edition: July 5-9, 2027
Applications are closed.
Info icon
Learn more
Data Science
From Text to Data: Language Models You Can Trust
Complete your details and we'll keep you informed about the next edition

I give my consent to be contacted by BSE with information about related academic offers in the future.

Course overview

A chatbot gives you a good answer in seconds. Modern tools also allow you to upload your own documents and extract data quickly. But getting a result you can publish or put into production is a different problem. Is an LLM even the right tool? How do you get structured output from thousands of documents rather than one? And what are the pitfalls you need to keep in mind when you develop your text-mining pipeline?

This course aims to teach modern text-mining tools for people who want to work with the data they generate either for academic projects or in applications. We start with how a machine reads text and how to measure whether it captures meaning, then move from word counts to word vectors, transformers and LLMs. Mornings are lectures, afternoons are labs on real data. You will fine-tune a small model and test it against a prompted LLM on the same task, build and evaluate a retrieval pipeline, and build an agent from a bare loop up to a leaderboard with a held-out test.

Throughout the course, we will put these models to work on the two sides of their use: extracting reliable information from large volumes of text, and generating useful, grounded answers with LLMs. We will close by looking at limits and biases, so that you leave with the knowledge to design text pipelines you can trust.

Faculty

Who is this course for?

This course has been designed for:

  • Graduate students and professionals looking to build a strong intuition for how to use modern language models in research and applications and how to evaluate their output

Learning outcomes

Upon successful completion of the course, you will have acquired a comprehensive understanding of:

  • How computers represent text, from word counts and TF-IDF to word vectors, transformers, and LLMs
  • The main language model architectures (encoder-only, decoder-only, and encoder-decoder) and what each is used for
  • When to use language models to extract information and when to use them to generate answers, and when simpler methods are the better tool
  • Why model outputs should be treated as data with measurement error, and how to validate them
  • The limits of language models: social biases, hallucinations, data contamination and reproducibility, as well as privacy, cost and regulation

You can also expect to develop critical skills such as:

  • Fine-tune a small pre-trained model and compare it with a prompted LLM on the same task
  • Build classifiers and topic models with little or no labeled data, using SetFit and BERTopic
  • Write prompts that return precise, structured output
  • Build an LLM agent and evaluate it on a held-out test set
  • Design a text-mining pipeline for research or industry in Python, using Hugging Face tools

Key topics for BSE Large Language Modeling course

Here is a course outline of what you will cover.

Class 1: From Text to Vectors

Plus iconPlus icon
  • AI use cases: examples for economists (sentiment in central bank speeches, job postings) and for industry (document search, customer feedback analysis)
  • How we read text: human understanding versus what a computer actually sees
  • Text pipeline design: basic guidelines for building text-mining pipelines for projects in research or industry
  • Model outputs are data: model output measurement error, and the role of validation sets.
  • Levels of granularity: characters, tokens, words, sentences, documents
  • Counting words: CountVectorizer, TF-IDF and BM25
  • Learning meaning: word2vec (skip-gram and CBOW)
  • Evaluating word vectors: similarity and analogy tests, and performance on a real task

Class 2: Language Models and Dynamic Vectors

Plus iconPlus icon
  • From word vectors to language models: word2vec gives each word a single vector, whatever its context. Language models read text and either extract information from it or generate new text
  • Three architectures: encoder-only models read the whole text and output vectors, used for semantic search. Decoder-only models read left to right and predict the next word, as in ChatGPT. Encoder-decoder models read a source text and write an output, as in translation
  • What a language model is: predicting the next word, the same idea as word2vec’s context prediction, applied to whole sequences
  • RNNs and ELMo: the first dynamic vectors, where the same word gets a different vector depending on its context. Application: more accurate classification
  • Attention and transformers: the architecture from Attention Is All You Need (Vaswani et al., 2017), which moves from word vectors to sentence and document vectors. Applications: translation and document search that can outperform TF-IDF and BM25 through semantic similarity

Class 3: Extracting Information with Language Models

Plus iconPlus icon
  • From transformers to BERT: an encoder-only model built to turn text into rich vectors rather than generate it
  • Fine-tuning: adapting a pre-trained model to your own labels
  • Transfer and few-shot learning: good results with little or no labeled data
  • Applications: SetFit, an accurate classifier from a few labeled examples. BERTopic, topics in a corpus without labels

Generating Text with Large Language Models

Plus iconPlus icon
  • From extraction to generation: decoder-only models, built to write text
  • Prompt engineering: clear instructions and examples for precise, structured answers
  • RAG (Retrieval-Augmented Generation): connecting an LLM to your own documents, using the semantic search from Class 2
  • Fine-tuning LLMs: adapting a model to a domain or style when prompting is not enough
  • Agents: letting an LLM reason, use tools, and take actions to complete a task

Class 5: Limits and Biases

Plus iconPlus icon
  • Back to measurement: evaluating the models built during the week, and why good benchmark scores are not enough
  • Social biases: stereotypes learned from training data, from word2vec associations to generated text
  • Hallucinations: when LLMs confidently invent facts, and how RAG reduces but does not remove the risk
  • Research pitfalls: look-ahead bias, data contamination, and reproducibility when models or versions change
  • Responsible use: privacy, cost, energy consumption and regulation

List of References

To help you prepare for this course, we recommend the following texts:

Plus iconPlus icon
  • Dell, M. Deep Learning for Economists
  • Dell, M. and Rambachan, A. NBER Methods Lecture 2026
  • Ludwig, J., Mullainathan, S. and Rambachan, A. Large Language Models: An Applied Econometric Framework
  • Carlson, J. and Dell, M. A Unifying Framework for Robust and Efficient Inference with Unstructured Data
  • Alammar, J. The Illustrated Word2vec
  • Alammar, J. The Illustrated Transformer
  • Alammar, J. The Illustrated Transformer
  • Schluntz, E. and Zhang, B. Building Effective Agents

Software / Hardware

Plus iconPlus icon
  • Participants must bring their own Laptop to participate fully in the course

Why join our Summer School?

All BSE Summer courses are taught to the same high standard as our Master’s programs. Join us to:

1

Network with like-minded peers

2

Study in vibrant Barcelona

3

Learn from world-renowned faculty

Admissions and Requirements

It is the participant’s responsibility to ensure they meet the admissions criteria.

Next edition: July 5-9, 2027
Applications are closed.

Requirements

Summer School applicants normally demonstrate one or more of the following:

  • A strong background in Economics or a field closely related to the course topic (Statistics, Law, etc.)
  • Postgraduate degree or current Master’s/PhD studies related to the course topic
  • Relevant professional experience

Requirements for this language models course

  • Participants of this course are expected to be familiar with the fundamentals of linear algebra and programming with Python and R
  • While a graduate-level background in Statistics, Machine Learning, or Data Science is not mandatory to attend the course, it is highly desirable. Participants with limited experience in these fields are encouraged to register for the “Data Science for Economics” course

Schedule

Here is your schedule for this edition of BSE Data Science Summer School From Text to Data: Language Models You Can Trust course.

Time
5
mon
6
tue
7
wed
8
thu
9
fri
09:00 - 11:00
Lecture
14:30 - 16:00
Practical

Credit Transfers (ECTS)

To be eligible for credit transfer, students must complete a final project.

Students will deliver a short final project one week after the summer school finishes. It will consist in solving a final problem that will include the practical and empirical issues worked on in class.

Consult the Summer School Admissions page for more information about this option.

Certificate of Attendance

Participants who attend more than 80% of the course will receive a Certificate of Attendance, free of charge.

Course
Harnessing Language Models: Your Path to NLP Expert
Data Science for Economics
From Prediction to Action: Modern Prescriptive Analytics
Large Language Models in Finance
Statistical Machine Learning for Large and Unstructured Data
Modality
Face-to-face
Face-to-face
Face-to-face
Face-to-face
Face-to-face
Total Hours
17.5
17.5
17.5
17.5
17.5
ECTS
1
1
1
1
1
Regular Fee
1,399€
1,399€
1,399€
1,399€
1,399€
Reduced Fee*
799€
799€
799€
799€
799€

* Reduced Fee applies for PhD or Master’s students, Alumni of BSE Master’s programs, and participants who are unemployed.

Multiple discounts are available.

For more information on discounts for participants funding their own course, please click here.

For more information on discounts for companies and institutions enrolling their employees, please click here.

Full discount conditions are available here.

FAQ

Need more information? Check out our most commonly asked questions or contact our Admissions Team.

Can I see the full Summer School calendar?

Plus iconMinus icon

You can view the full Summer School calendar here.

Is accommodation included in the course fee?

Plus iconMinus icon

Unfortunately, accommodation is not included in the course fee. Participants are responsible for finding accommodation.

Are the sessions recorded?

Plus iconMinus icon

Sessions will NOT be recorded; however, the materials provided by the professor will be available for a month after the course has finished.

How much does each Summer School course cost?

Plus iconMinus icon

Fees for each course may vary. Please consult each course page for accurate information.

Are there any discounts available?

Plus iconMinus icon

Yes, BSE offers a variety of discounts on its Summer School courses. See more information about available discounts or request a personalized discount quote by email.

Can I take more than one course?

Plus iconMinus icon

Yes! you can combine any of the Summer School courses (schedule permitting). See the full course calendar.

Cancelation and Refund Policy

Plus iconMinus icon

Please consult BSE Summer School policies for more information.

Are there any evening activities during the course?

Plus iconMinus icon

Yes, a social dinner is held once a week for all participants, it is free to attend.

Contact our Admissions Team

Mix and match your summer courses!

Remember that you can combine this program with courses in any of the other BSE Summer School programs (schedule permitting). Maximise your learning this summer and take advantage of our multiple-course discount.

Subscribe to our newsletter
Want to receive the latest news and updates from the BSE? Share your details below.
Founding Institutions
Distinctions
Logo BSE
© Barcelona Graduate School of
Economics. All rights reserved.
FacebookInstagramLinkedinXYoutube