# elizaOS Development Discord - 2025-05-21

## Overall Discussion Highlights

### v2 Implementation Challenges
- **Hidden Forces** expressed significant frustration with v2 implementation, citing numerous conflicts when following the Quick Start guide
- The v2-develop branch reportedly doesn't load the full installation, and manual installation attempts cause build failures
- **cjft** acknowledged these documentation issues, noting improvements were underway as they prepare for the v2 release at the end of the month

### Knowledge System & RAG Implementation
- **Ruby** explained Eliza's chunking configuration for RAG is handled in the core `@elizaos/plugin-rag` package
- Default settings: 1000 tokens maximum chunk size with 200 token overlap
- Settings can be overridden in `config.js` using `RAG_CHUNK_SIZE` and `RAG_CHUNK_OVERLAP` parameters
- Current implementation uses a basic sliding window approach, with smarter semantic chunking in development
- Knowledge files can be optimized with metadata tags (#topic, #context, #priority) and section headers

### Pull Request Discussions
- **PR #4686**: Introduces unified environment file lookup system with `findNearestEnvFile` utility
- **PR #4687**: Adds timeout functionality to CLI tests to address flakiness in CI environments
- **PR for plugin-ollama**: Adds automatic model pulling functionality
- **PR #4693**: Removes Opus dependencies (breaking change)
- **PR #4695**: Changes pglite target directory to keep .pglite file with the project rather than in global space
- Discussion about stacked diffs workflow benefits for code review by breaking changes into smaller pieces

### Publishing & Deployment
- Issues identified when attempting to publish from a personal fork rather than the official repository
- Version bumping is not automatic for every commit, allowing developers to work on branches and make releases when ready

## Key Questions & Answers

**Q: Where in Eliza's codebase is the chunking configuration defined for knowledge files?**  
A: It's handled in the core @elizaos/plugin-rag package (answered by Ruby)

**Q: What parameters control the maximum chunk size in Eliza's current implementation?**  
A: Default max size is 1000 tokens with 200 token overlap, configurable with RAG_CHUNK_SIZE and RAG_CHUNK_OVERLAP (answered by Ruby)

**Q: Can Eliza's current chunking system be modified to respect markdown headers?**  
A: Not currently, but they're working on smarter semantic chunking that will respect markdown structure (answered by Ruby)

**Q: Do I need to add the rag package plugin to my character plugin array?**  
A: No, the rag plugin is already part of elizaOS core, you just need to create config.js with your settings (answered by Ruby)

**Q: Is the version bump automatically handled?**  
A: No, it doesn't deploy if the version is the same as before (answered by cjft)

**Q: Why not auto-bump versions with every commit?**  
A: Not every commit will auto bump, allowing developers to work on branches and make releases when desired (answered by cjft)

## Community Help & Collaboration

### v2 Implementation Support
- **Agent Joshua** attempted to help **Hidden Forces** by asking for specific conflict details and which branch/tag they were using
- **cjft** reassured **Hidden Forces** that documentation issues were being addressed as a top priority with improvements coming before the month-end v2 release

### RAG Configuration Guidance
- **Ruby** provided **Scooter** with detailed explanation of chunking configuration, parameters, and optimization techniques
- **Ruby** shared examples of optimized knowledge file formatting with metadata tags and a sample config.js with custom settings
- **Ruby** clarified that the RAG plugin is built into the core, unlike the SQL plugin which is separate

### Pull Request Collaboration
- **Ruby** suggested improvements to **sayonara's** PRs, including adding debug logging for fallback cases and making timeouts configurable
- **Ruby** helped identify publishing workflow issues when attempting to publish from a personal fork
- **cjft** directed **sayonara** to submit PRs to the official repo instead of a fork

## Action Items

### Technical
- Fix conflicts in v2-develop branch that prevent proper installation (Mentioned by Hidden Forces)
- Fix build issues when manually loading full installation in v2 (Mentioned by Hidden Forces)
- Add debug logging when findNearestEnvFile falls back to defaults (Mentioned by Ruby)
- Consider caching env file lookup results for performance (Mentioned by Ruby)
- Make CLI test timeout configurable via environment variable (Mentioned by Ruby)
- Add error handling with retry/backoff for Ollama model pulls (Mentioned by Ruby)
- Add validation to prevent nested .pglite files (Mentioned by Ruby)
- Implement custom chunking configuration in config.js file (Mentioned by Ruby)
- Verify config settings are working with console.log and monitoring (Mentioned by Ruby)

### Documentation
- Fix Quick Start guide for v2 implementation to address conflicts and installation issues (Mentioned by Hidden Forces)
- Update audio docs to note breaking change from removing Opus dependencies (Mentioned by Ruby)
- Create examples of optimized knowledge file formatting with metadata tags and section headers (Mentioned by Ruby)

### Feature
- Implement stacked diffs workflow with supporting tooling (Mentioned by Ruby)
- Develop smarter semantic chunking to respect markdown structure (Mentioned by Ruby)