Project 5: Team Bio Writer
AI Engineer
Builds on these lessons
Current Task
Objective
A sequential chain feeds one step's output straight into the next step's input, letting several prompts run as a single pipeline.
Task: compose a bio-writing prompt and a summarizing prompt into one sequential pipeline, then print its length.
index.py
from langchain_core.prompts import PromptTemplate
bio_prompt = PromptTemplate.from_template("Write a one-line bio for {name}, a {role}.")
summary_prompt = PromptTemplate.from_template("Shorten this bio to five words: {bio}")
pipeline_steps = [bio_prompt, summary_prompt]
print(len(pipeline_steps))
* Hint: Correct characters turn green, incorrect ones turn red.
Live Preview
🖼️
Verify your code to see the preview