<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas" -->

---
title: How to Use Context Hub (chub) to Build a Companion...
description: Context Hub (chub) is a CLI tool that gives coding agents curated, versioned documentation and skills to reduce hallucinations about APIs and SDKs. This...
canonical: https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: How to Use Context Hub (chub) to Build a Companion Relevance Engine | daily.dev
og:description: Context Hub (chub) is a CLI tool that gives coding agents curated, versioned documentation and skills to reduce hallucinations about APIs and SDKs. This...
og:url: https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas
og:image: https://api.daily.dev/og/posts/bx1KdPlAs.png
og:image:alt: How to Use Context Hub (chub) to Build a Companion Relevance Engine
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Use Context Hub (chub) to Build a Companion Relevance Engine

**[freeCodeCamp](https://daily.dev/sources/freecodecamp)** · 12 min read · 3 upvotes · 0 comments

## Summary

Context Hub (chub) is a CLI tool that gives coding agents curated, versioned documentation and skills to reduce hallucinations about APIs and SDKs. This tutorial covers installing the official chub CLI, understanding its docs/skills content model, using incremental fetch and layered sources, and building a companion relevance engine that adds a reranking layer on top of the baseline BM25 search. The companion repo introduces a signals.json build artifact extracting headings, reference file tokens, language metadata, and annotation overlap to improve retrieval for shorthand queries like 'rrf', 'signin', and 'pg vector'. Benchmark results show improved mode achieving 1.0 top-1 accuracy vs 0.333 for baseline on a synthetic stress set. The tutorial also explains how to connect a broad companion repo to a focused upstream PR.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://www.freecodecamp.org/news/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine/>

## Similar posts on daily.dev

- [Context Hub vulnerable to supply chain attacks, says tester](https://daily.dev/posts/context-hub-vulnerable-to-supply-chain-attacks-says-tester-dxqkuuazt) · InfoWorld · 0 upvotes · 0 comments
- [Context Engineering: The New Prompt Engineering](https://daily.dev/posts/context-engineering-the-new-prompt-engineering-gycv6m6wf) · SitePoint · 1 upvotes · 0 comments

---

Tags: [#ai-agents](https://daily.dev/tags/ai-agents), [#rag](https://daily.dev/tags/rag)

[View this post on daily.dev](https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"How to Use Context Hub (chub) to Build a Companion Relevance Engine","url":"https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas"},"datePublished":"2026-04-17T23:25:19.770Z","dateModified":"2026-04-17T23:25:44.713Z","description":"Context Hub (chub) is a CLI tool that gives coding agents curated, versioned documentation and skills to reduce hallucinations about APIs and SDKs. This...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ccf54ce8276524b03dfe311d67bb515e?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/ccf54ce8276524b03dfe311d67bb515e?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"freeCodeCamp","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"freeCodeCamp","logo":"https://media.daily.dev/image/upload/t_logo,f_auto/v1628412854/logos/freecodecamp","url":"https://daily.dev/sources/freecodecamp"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/how-to-use-context-hub-chub-to-build-a-companion-relevance-engine-bx1kdplas","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":3},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"ai-agents,rag","timeRequired":"PT12M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"freeCodeCamp","item":"https://daily.dev/sources/freecodecamp"},{"@type":"ListItem","position":3,"name":"How to Use Context Hub (chub) to Build a Companion Relevance Engine"}]}
```

