Concepts

Vector Stores and Retrievers Versus RAG (Retrieval-Augmented Generation)

Vector Stores and Retrievers

  • are tools used to store and fetch data.

Example Search Query:

"cat"

Response:

[Document(page_content='Cats are independent pets that often enjoy their own space.', metadata={'source': 'mammal-pets-doc'}),
 Document(page_content='Dogs are great companions, known for their loyalty and friendliness.', metadata={'source': 'mammal-pets-doc'}),
 Document(page_content='Rabbits are social animals that need plenty of space to hop around.', metadata={'source': 'mammal-pets-doc'}),
 Document(page_content='Parrots are intelligent birds capable of mimicking human speech.', metadata={'source': 'bird-pets-doc'})]

RAG (Retrieval-Augmented Generation)

  • uses these tools as part of a larger workflow that not only retrieves relevant data but also uses it to inform and improve the generation of new content by a language model.

Example Search Query

"What are the characteristics of different pets?"

Response:

Cats are independent pets that often enjoy having their own space. Dogs, on the other hand, are known for being great companions due to their loyalty and friendliness. Rabbits are social animals that require plenty of space to hop around, and parrots are intelligent birds capable of mimicking human speech.

Planner-Worker-Solver Versus Plan-and-Execute

Planner-worker-solver workflow

  • Focuses on explicit problem-solving role.

  • Useful for well-understood tasks.

  • Has 3 distinct roles with specific functions.

Plan-and-execute workflow

  • Focuses on separating planning from execution, with the ability to replan when necessary.

  • Useful for tasks with unpredictable challenges.

  • Has only 1 role with 2 phases.

Last updated