Skip to content

NakulSachdeva/transcript-summarization-prompt-optimization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

11 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ Transcript Summarization with Prompt Optimization

This project demonstrates how to summarize meeting transcripts using LLMs (Large Language Models) with different prompt engineering strategies.
We compare approaches like direct summaries, bullet points, role-based summaries, and optimized prompts to evaluate how prompt design affects output.


๐Ÿš€ Features

  • Compare multiple prompt engineering strategies
  • Measure compression ratios (how much text is reduced)
  • Visualize results with charts
  • Easy-to-run notebook for experimentation

โš™๏ธ Setup

  1. Clone this repo
    git clone https://github.com/your-username/transcript-summarization-prompt-optimization.git
    cd transcript-summarization-prompt-optimization

Install dependencies

pip install -r requirements.txt Run the notebook

Open notebooks/transcript_summarizer.ipynb

Add your OPENAI_API_KEY in a .env file or environment variable

Execute cells to generate summaries and results

๐Ÿ“Š Results

Tabular Comparison

prompt_type output input_words output_words compression_ratio
direct Q2 earnings grew 20% driven by new products, but costs rose due to supply chain issues. 42 19 0.45
bullet_points - Revenue up 20%
- Driven by product launches
- Costs increased from supply chain issues
42 16 0.38
role_based As a financial analyst: Q2 growth strong at 20%, though costs surged. Q3 outlook positive as logistics improve. 42 22 0.52
optimized Q2: +20% revenue from launches; costs rose on supply issues; Q3 margins expected to improve. 42 18 0.43

๐Ÿ“Š Visual Insights Compression Ratio by Prompt Type

compression_ratio

Input vs. Output Word Counts

word_counts

๐Ÿ” Example Transcript (input):

Alice: Welcome everyone. Today weโ€™ll review Q2 earnings.
Bob: Revenue increased by 20% year-over-year, driven by new product launches.
Carol: However, operational costs rose significantly due to supply chain issues.
Dave: Looking ahead, we expect stronger margins in Q3 as logistics stabilize.

Optimized Prompt Summary (output):

Q2: +20% revenue from launches; costs rose on supply issues; Q3 margins expected to improve.

๐Ÿค Contributing Pull requests are welcome. For major changes, please open an issue first to discuss what youโ€™d like to change.

About

Prompt engineering & evaluation for transcript summarization

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages