Graded Quiz: Prompt Engineering and LangChain :Fundamentals of AI Agents Using RAG and LangChain (IBM AI Engineering Professional Certificate) Answers 2025
1. Why does a logistics company leverage LangChain?
❌ Helps in tracking GPS
❌ Provides inventory APIs
❌ Fine-tunes warehouse models
✅ Connects LLMs to data sources and custom workflows
Explanation:
LangChain is designed to connect LLMs with external data, tools, and workflows without retraining the model.
2. Changing input wording to get better output is called:
❌ Chain optimization
❌ Data labeling
❌ Hyperparameter tuning
✅ Prompt engineering
Explanation:
Prompt engineering refines prompts so LLMs produce more accurate or relevant responses.
3. Best platform for drafting & refining prompts directly with a language model:
❌ Google Classroom
✅ OpenAI’s Playground
❌ Microsoft Copilot
❌ Google Gemini
Explanation:
OpenAI Playground is designed specifically to experiment with and refine prompts interactively.
4. How does ChatMessagePrompt help simulate dialogue history?
❌ Secures user data access
❌ Controls LLMs at NLP level
✅ Structures messages and aligns them with the main context
❌ Accesses real-time data
Explanation:
ChatMessagePrompt formats conversation history properly, helping LLMs produce contextually relevant responses.
5. Step needed for capturing semantic meaning of document sections:
❌ Document loader
❌ Document splitter
❌ Document source
✅ Document embedding
Explanation:
Embeddings convert text into vector representations that capture semantic meaning, essential for RAG.
6. Which LangChain components manage memory and tool usage?
❌ Use documents
❌ Use chains
✅ Use memory for history and agents for tool-based tasks
❌ Agents generate outputs from memory only
Explanation:
Memory stores conversation context; agents invoke external tools (like databases) during runtime.
7. Why would a publishing company use LangChain?
✅ To create AI-powered content tools using LLMs efficiently
❌ Manage image datasets
❌ Build video-editing apps
❌ Replace SQL databases
Explanation:
LangChain helps integrate LLMs into workflows such as content generation, editing assistance, RAG pipelines, and automation.
🧾 Summary Table
| Q# | Correct Answer | Key Concept |
|---|---|---|
| 1 | Connect LLMs to data & workflows | Purpose of LangChain |
| 2 | Prompt engineering | Improve LLM outputs |
| 3 | OpenAI Playground | Prompt testing |
| 4 | Structure messages | ChatMessagePrompt |
| 5 | Document embedding | Semantic understanding |
| 6 | Memory + Agents | Multi-step tool usage |
| 7 | AI-powered content tools | LangChain in publishing |