Tutorials

Complete Guide to Knowledge Files in GenMB

Upload design specs, API references, and product requirements as persistent context. Your AI remembers project constraints across sessions.

Ambuj Agrawal

Ambuj Agrawal

Founder & CEO

5 min read

What Are Knowledge Files?

Knowledge Files are documents you upload to a GenMB project that give the AI persistent context about your application. Instead of repeating the same instructions in every chat message — your brand colors, API endpoints, coding conventions, or product requirements — you upload them once and the AI references them automatically during every generation and refinement.

Think of Knowledge Files as the project brief that a new developer would read on their first day. They capture decisions, constraints, and standards so the AI produces consistent output across sessions, collaborators, and iterations.

Why Knowledge Files Matter

Without Knowledge Files, every conversation with the AI starts from scratch. You describe your design system, the AI follows it for one generation, and then the next time you refine, it may drift. Knowledge Files solve three specific problems:

Consistency Across Sessions

Your brand guidelines, color palette, and typography choices are referenced every time the AI generates or refines code. Whether you come back after five minutes or five weeks, the output remains aligned with your specs.

Reduced Prompt Repetition

Instead of pasting the same context into every prompt — "use Inter font, primary color #2563EB, 8px border radius on all buttons" — the AI reads it from your Knowledge Files automatically. Your prompts can focus on what you want built rather than how it should look.

Team Alignment

When multiple collaborators work on the same project, Knowledge Files ensure everyone gets the same AI behavior. Design decisions are documented once and applied uniformly regardless of who is prompting.

How to Add Knowledge Files

Adding Knowledge Files to your project takes just a few steps:

Step 1: Open the Knowledge Panel

In the app editor, click the Knowledge Files button in the sidebar. This opens the upload panel where you can manage all documents associated with your project.

Step 2: Upload Your Documents

Click Upload and select one or more files. You can also drag and drop files directly into the panel. Each file is processed and stored as context for the AI.

Step 3: Review and Organize

After uploading, each file appears in the list with its name and size. You can remove files that are no longer relevant or upload updated versions to replace outdated context.

Supported Formats

Knowledge Files support the most common document formats used in software development:

  • Plain text (.txt) — Simple notes, coding conventions, requirements lists
  • Markdown (.md) — Structured documentation, API references, design specs
  • PDF (.pdf) — Design mockups, client briefs, exported specs
  • JSON (.json) — API schemas, configuration references, data models

The AI extracts the textual content from each file and includes it as context during code generation. For best results, use text-based formats like Markdown or plain text where the structure is easy for the AI to parse.

How the AI Uses Knowledge File Context

When you generate or refine code, the AI receives your Knowledge Files as additional context alongside your prompt. Here is how the flow works:

  1. You type a prompt like "Add a pricing page"
  2. GenMB loads all Knowledge Files attached to your project
  3. The AI receives both your prompt and the Knowledge File content
  4. It generates code that respects the constraints, styles, and conventions in your documents

The AI does not just match keywords — it understands the intent of your documents. If your design spec says "all buttons should use rounded corners and the primary brand color," the AI applies that to every button it generates, even if your prompt does not mention styling.

Best Practices

Design Specifications

Upload a Markdown file describing your visual language:

```markdown

# Design System

Colors

  • Primary: #2563EB
  • Secondary: #7C3AED
  • Background: #F8FAFC
  • Text: #1E293B

Typography

  • Headings: Inter, semi-bold
  • Body: Inter, regular, 16px
  • Code: JetBrains Mono

Components

  • Border radius: 8px on cards, 6px on buttons
  • Shadows: subtle (0 1px 3px rgba(0,0,0,0.1))
  • Spacing: 8px grid system

`

API Documentation

If your app integrates with external APIs, upload the endpoint reference:

```markdown

# API Reference

GET /api/products

Returns list of products.

Response: { products: [{ id, name, price, image_url }] }

POST /api/orders

Creates a new order.

Body: { product_id, quantity, customer_email }

Response: { order_id, status }

`

Coding Conventions

Document patterns you want the AI to follow consistently:

```markdown

# Coding Standards

  • Use functional components only (no class components)
  • Use const for all variable declarations
  • Error messages should be user-friendly, never show raw errors
  • All forms must have loading states and validation
  • Use try/catch for all async operations

`

Product Requirements

Upload your PRD or feature spec so the AI understands the bigger picture even when you are working on individual features.

Limitations

Knowledge Files are powerful but have some boundaries to keep in mind:

  • Size limit: Each file has a maximum size. Keep documents focused and concise rather than uploading massive files.
  • Text extraction: The AI works best with text-based formats. Images embedded in PDFs are not analyzed — describe visual requirements in text instead.
  • Context window: Very large Knowledge Files may be summarized by the AI to fit within its context window. Prioritize the most important information at the top of your documents.
  • Project scope: Knowledge Files are scoped to a single project. If you want the same context across multiple projects, upload the file to each one.

Summary

Knowledge Files give you persistent, automatic context for your GenMB projects. Upload design specs, API references, coding conventions, and product requirements once, and the AI applies them to every generation and refinement. They eliminate prompt repetition, maintain consistency across sessions, and keep collaborators aligned. Use text-based formats for best results, keep documents focused, and put the most critical information first.

Frequently Asked Questions

What file formats do Knowledge Files support?
Knowledge Files support plain text (.txt), Markdown (.md), PDF (.pdf), and JSON (.json). Text-based formats like Markdown and plain text work best because the AI can parse their structure directly.
Do I need to reference Knowledge Files in my prompts?
No. Knowledge Files are loaded automatically as context for every generation and refinement. The AI applies the constraints and conventions from your documents without you needing to mention them explicitly.
Can I share Knowledge Files across multiple projects?
Knowledge Files are scoped to individual projects. To use the same context in multiple projects, upload the file to each project separately.
Ambuj Agrawal

Ambuj Agrawal

Founder & CEO

Award-winning AI author and speaker. Building the future of app development at GenMB.

Follow on LinkedIn

Ready to start building?

Turn your ideas into reality with GenMB's AI-powered app builder.