Context Sources

Learn how to add context to your AI conversations through document uploads and GitHub repository connections.

Last Updated: 5/27/2025

Context Sources in Vectly

Context is what makes AI conversations truly powerful. By providing relevant documents, code, and other materials, you enable AI to give more accurate, specific, and useful responses. Vectly supports multiple context sources to enhance your AI interactions.

Types of Context Sources

1. Document Uploads

Upload files directly to provide context:

  • PDFs: Research papers, manuals, reports
  • Text Files: Notes, logs, configurations
  • Markdown: Documentation, README files
  • Office Docs: Word documents, presentations
  • Code Files: Source code in any language

2. GitHub Repositories

Connect your code repositories:

  • Full Repository Access: Complete codebase context
  • Selective Sync: Choose specific files/folders
  • Branch Selection: Work with different versions
  • Auto-Updates: Stay synced with changes

3. Project Context

Shared context across chats:

  • Project Files: Available to all project chats
  • Persistent Context: Maintains across sessions
  • Shared Knowledge: Consistent responses
  • Efficient Usage: No repeated processing

Uploading Documents

Quick Upload Methods

Drag and Drop

  1. Open any chat or project
  2. Drag files from your computer
  3. Drop in the chat area
  4. Files process automatically

Click to Upload

  1. Click the paperclip icon
  2. Select files from browser
  3. Multiple files supported
  4. See upload progress

Paste Content

  1. Copy text or images
  2. Paste directly in chat
  3. Automatic format detection
  4. Instant processing

File Processing

What Happens When You Upload

  1. Validation: File type and size check
  2. Extraction: Text content extracted
  3. Chunking: Split into optimal sections
  4. Embedding: Convert to searchable format
  5. Indexing: Add to knowledge base
  6. Ready: Available for AI reference

Processing Status

  • Uploading: Transfer in progress
  • Processing: Extracting content
  • Indexing: Creating embeddings
  • Complete: Ready for use
  • Error: Processing failed

Best Practices for Documents

File Preparation

  • Clear Structure: Use headings and sections
  • Text-Based: Ensure PDFs have selectable text
  • Quality Scans: High resolution for OCR
  • Organized Content: Logical flow and layout

Optimal File Types

TypeBest ForNotes
PDFReports, papersText-based, not scanned
MarkdownDocumentationPreserves formatting
TXTSimple notesUniversal compatibility
DOCXWord documentsConverted to text
CodeSource filesSyntax preserved

GitHub Integration

Setting Up GitHub

First-Time Setup

  1. Go to Project Settings
  2. Click "Connect GitHub"
  3. Authorize Vectly app
  4. Grant repository access
  5. Return to Vectly

Repository Selection

  1. Choose organization/account
  2. Select repositories
  3. Configure access level
  4. Confirm connection

Repository Configuration

File Patterns

Control what gets indexed:

Include Patterns:

*.py          # All Python files
src/**/*.js   # JavaScript in src
docs/*.md     # Markdown in docs

Exclude Patterns:

node_modules/  # Dependencies
*.test.js      # Test files
build/         # Build output
.env           # Secrets

Branch Selection

  • Default branch auto-selected
  • Switch branches as needed
  • Multiple branch support
  • Tag-based selection

Sync and Updates

Automatic Sync

  • Real-time webhook updates
  • Commit triggers re-indexing
  • Incremental updates only
  • Efficient processing

Manual Sync

  1. Go to repository settings
  2. Click "Sync Now"
  3. See sync progress
  4. Verify completion

GitHub Best Practices

Repository Structure

  • Clear folder organization
  • Descriptive file names
  • Good documentation
  • Clean commit history

For Best Results

  • Include README files
  • Add code comments
  • Document APIs
  • Explain architecture

Managing Context

Context Hierarchy

Chat Level

  • Files uploaded to specific chat
  • Available only in that chat
  • Deleted with chat
  • Quick and temporary

Project Level

  • Files shared across project
  • Available to all chats
  • Persistent storage
  • Organized management

Global Level (Coming Soon)

  • Personal knowledge base
  • Cross-project access
  • Permanent storage
  • Advanced organization

Context Limits

Storage Limits by Plan

PlanStorageFiles/Project
Free100 MB5
Starter1 GB20
Hobbyist5 GB50
Power20 GB100
Professional100 GB500

Token Limits

  • Each model has context windows
  • Automatic prioritization
  • Most relevant content first
  • Manual override available

Context Organization

File Management

  • Naming: Use descriptive names
  • Folders: Organize by type/topic
  • Versions: Replace outdated files
  • Cleanup: Remove unused files

Effective Structure

Project: E-commerce Site
├── Documentation/
│   ├── API_Reference.md
│   ├── User_Guide.pdf
│   └── Architecture.md
├── Requirements/
│   ├── Functional_Spec.pdf
│   └── Design_Mockups.pdf
└── Code/
    └── [Connected via GitHub]

Advanced Context Features

Multi-Modal Context

Supported Formats

  • Text: All text-based files
  • Images: PNG, JPG, GIF (with GPT-4V)
  • Tables: CSV, Excel extracts
  • Code: Syntax highlighting

Coming Soon

  • Audio transcription
  • Video frame analysis
  • Diagram understanding
  • Handwriting recognition

Context Intelligence

Smart Retrieval

  • Semantic search across files
  • Relevance ranking
  • Cross-reference detection
  • Duplicate handling

Context Awareness

  • Temporal understanding
  • Version tracking
  • Change detection
  • Relationship mapping

Context Optimization

Performance Tips

  1. Quality over Quantity: Better few good documents
  2. Regular Updates: Keep content current
  3. Clear Organization: Easy to navigate
  4. Remove Duplicates: Avoid confusion

Credit Efficiency

  • Shared context saves credits
  • Caching reduces costs
  • Project organization helps
  • Strategic file selection

Use Case Examples

Software Development

Context Setup:
- GitHub repo connected
- API documentation uploaded
- Architecture diagrams added
- Test cases included

Usage: "How does the authentication flow work?"
AI references: Code + Docs + Diagrams

Academic Research

Context Setup:
- Research papers uploaded
- Data files added
- Notes and summaries
- Reference materials

Usage: "Compare methodologies across papers"
AI references: Multiple papers simultaneously

Business Analysis

Context Setup:
- Financial reports uploaded
- Market research added
- Competitor analysis
- Historical data

Usage: "What are the growth trends?"
AI references: Reports + Data files
Context Setup:
- Contracts uploaded
- Legal precedents added
- Compliance documents
- Policy files

Usage: "Are we compliant with GDPR?"
AI references: Policies + Regulations

Troubleshooting Context

Upload Issues

File Won't Upload

  • Check file size limits
  • Verify file type supported
  • Ensure stable connection
  • Try different browser

Processing Errors

  • File may be corrupted
  • Text extraction failed
  • Try converting format
  • Contact support

GitHub Issues

Connection Problems

  • Re-authorize app
  • Check permissions
  • Verify webhook setup
  • Review access tokens

Sync Failures

  • Check repository access
  • Verify branch exists
  • Review file patterns
  • Check rate limits

Context Not Working

AI Not Using Context

  • Verify processing complete
  • Check relevance to query
  • Be more specific
  • Reference files directly

Wrong Information

  • Update outdated files
  • Check for conflicts
  • Verify source accuracy
  • Clear old context

Best Practices Summary

Do's ✅

  • Organize files logically
  • Use descriptive names
  • Update regularly
  • Remove outdated content
  • Monitor storage usage
  • Leverage project context
  • Connect relevant repos

Don'ts ❌

  • Upload sensitive data
  • Use encrypted files
  • Exceed storage limits
  • Upload duplicates
  • Ignore processing errors
  • Mix unrelated content
  • Connect private repos carelessly

Future Enhancements

Coming soon:

  • Web page imports
  • API connections
  • Database links
  • Cloud storage integration
  • Live document sync
  • Team shared context

Context is the key to unlocking AI's full potential. Start with a few quality documents and build your knowledge base over time!