Bird
0
0

Why does WebBaseLoader require URLs to be passed as a list rather than a single string?

hard📝 Conceptual Q10 of 15
LangChain - Document Loading
Why does WebBaseLoader require URLs to be passed as a list rather than a single string?
ATo enforce HTTPS protocol on URLs
BBecause strings are not valid URL formats
CTo support loading multiple web pages in one call
DTo enable asynchronous loading internally
Step-by-Step Solution
Solution:
  1. Step 1: Understand design of WebBaseLoader

    It is designed to load multiple web pages at once, so it expects a list of URLs.
  2. Step 2: Evaluate other options

    Strings can be valid URLs, HTTPS enforcement is unrelated, and async loading is internal detail.
  3. Final Answer:

    To support loading multiple web pages in one call -> Option C
  4. Quick Check:

    List input enables multiple URLs [OK]
Quick Trick: List input allows multiple URLs to load at once [OK]
Common Mistakes:
  • Thinking strings are invalid URLs
  • Assuming it enforces HTTPS
  • Confusing input type with async behavior

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More LangChain Quizzes