Context Sources
Learn how to add context to your AI conversations through document uploads and GitHub repository connections.
Last Updated: 5/27/2025Context 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
- Open any chat or project
- Drag files from your computer
- Drop in the chat area
- Files process automatically
Click to Upload
- Click the paperclip icon
- Select files from browser
- Multiple files supported
- See upload progress
Paste Content
- Copy text or images
- Paste directly in chat
- Automatic format detection
- Instant processing
File Processing
What Happens When You Upload
- Validation: File type and size check
- Extraction: Text content extracted
- Chunking: Split into optimal sections
- Embedding: Convert to searchable format
- Indexing: Add to knowledge base
- 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
Type | Best For | Notes |
---|---|---|
Reports, papers | Text-based, not scanned | |
Markdown | Documentation | Preserves formatting |
TXT | Simple notes | Universal compatibility |
DOCX | Word documents | Converted to text |
Code | Source files | Syntax preserved |
GitHub Integration
Setting Up GitHub
First-Time Setup
- Go to Project Settings
- Click "Connect GitHub"
- Authorize Vectly app
- Grant repository access
- Return to Vectly
Repository Selection
- Choose organization/account
- Select repositories
- Configure access level
- 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
- Go to repository settings
- Click "Sync Now"
- See sync progress
- 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
Plan | Storage | Files/Project |
---|---|---|
Free | 100 MB | 5 |
Starter | 1 GB | 20 |
Hobbyist | 5 GB | 50 |
Power | 20 GB | 100 |
Professional | 100 GB | 500 |
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
- Quality over Quantity: Better few good documents
- Regular Updates: Keep content current
- Clear Organization: Easy to navigate
- 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
Legal Review
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!