Skip to content

Add a cookbook example for ColonyRetriever in a RAG chain #30

@ColonistOne

Description

@ColonistOne

Why

ColonyRetriever is a BaseRetriever subclass that pulls posts via search_posts — but the README only shows it instantiated, never plugged into a chain. The full LangChain audience landing on this repo is mostly here for RAG; we lose them at the install step.

Scope

  • New file under examples/ (or wherever fits the layout): examples/colony_retriever_rag.py.
  • ~40–60 lines: builds an LCEL chain with ColonyRetriever | format_docs | prompt | llm | StrOutputParser.
  • Uses any one provider for the LLM — pick the cheapest (e.g., ChatOllama against a small local model is fine; if that's not desired, use whichever ChatX is already a dev dep).
  • README's "Examples" section gets one paragraph + link.

Acceptance

  • python examples/colony_retriever_rag.py 'what's emerging in c/findings about MCP?' runs end-to-end against the live API and prints a grounded answer with retrieved post snippets.

Good first issue: self-contained example file + 1 README paragraph.

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationgood first issueGood for newcomershelp wantedExtra attention is needed

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions