DEDUPED Hot AI repos, turned into use cases Get the Monday 5

How to point the knowledge base tool at your own Pinecone index with AI Chat Demo

Reuse the chat app and retrieval tool with your own Pinecone index and text content.

Short answer: Create a Pinecone index with integrated embedding and load your text into it, since the README says raw text goes up and Pinecone embeds it server-side; then open src/config.ts and set the Pinecone key and your new index host; read app/src/rag/searchKnowledgeBase.ts and update the system behavior that tells the model to answer Margelo questions only from retrieved context, changing the topic to your own. All steps.

Credentials. Your Pinecone and OpenAI keys go into the app bundle under this demo setup, so limit their scope and rotate them after testing.

Who it is forA developer or product team with their own documentation who wants a mobile assistant that answers only from that content.

The problemBuilding a retrieval-backed chat that answers only from a specific body of text means wiring a streamed model, a search tool, and a mobile UI together.

The outcomeThe assistant answers questions from your index, and the answers draw on the retrieved text instead of the model's memory.

What you need first

  • Xcode and CocoaPods for iOS, or the Android setup from the React Native environment guide
  • Node 22.11 or newer
  • An OpenAI API key
  • A Pinecone API key, a populated Pinecone index, and its index host

Steps

  1. Create a Pinecone index with integrated embedding and load your text into it, since the README says raw text goes up and Pinecone embeds it server-side.
  2. Open src/config.ts and set the Pinecone key and your new index host.
  3. Read app/src/rag/searchKnowledgeBase.ts and update the system behavior that tells the model to answer Margelo questions only from retrieved context, changing the topic to your own.
  4. Run npm run typecheck to confirm the changes compile.
  5. Run npm run ios or npm run android and test questions that you know the index can answer.

Prompt for your agent

In the margelo/ai-chat-demo repo, change the knowledge base search to use the Pinecone index host <your index host> and adjust the retrieval instructions for <your topic>. Run npm run typecheck and report the result, then ask one question you know the index answers and confirm the reply uses retrieved text.

Caveat. The README does not describe how to populate the index, so the content loading step depends on your own Pinecone process.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for margelo/ai-chat-demo and "Point the knowledge base tool at your own Pinecone index"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer