David Van Dijcke Research Assistant
David Van Dijcke - Econometric Research Assistant
An AI-powered assistant specializing in David Van Dijcke’s econometric research. David is an econometrician on the 2025-26 job market who develops novel methods for functional and high-dimensional data.
Available Versions
- app.py - Original version with basic chunking
- app_improved.py - Enhanced version with better prompts
- app_full_context.py - Legacy full-context version
- app_optimized.py - Smart retrieval with section extraction and caching
Features
- Econometric Methods Focus: Detailed information about David’s methodological contributions
- Job Market Paper (R3D): Regression Discontinuity Design with Distribution-Valued Outcomes
- Technical Expertise: Functional data analysis, optimal transport, and geometric measure theory
- Policy Applications: How David applies econometric tools to answer questions with big data
- Research Portfolio: Information on FDR, DISCO, RTO, and other papers
New Improvements
- Full Paper Loading: Reads complete PDFs instead of just first few pages
- Large Context Window: Leverages GLM 5.2’s 1M-token context window
- Smart Retrieval: Query-type based retrieval (technical, overview, application)
- Section Extraction: Intelligent parsing of paper sections
- Response Caching: Instant responses for repeated queries
- Hierarchical Search: Both section-level and chunk-level retrieval
Getting the Best Performance
The assistant calls GLM 5.2 through OpenRouter using the OpenAI Python client. You only need one OpenRouter API key.
Step 1: Get an OpenRouter API Key
- Go to https://openrouter.ai/keys
- Create a new key and copy it
Step 2: Add the API Key to Your Space
- Go to your Space settings: https://huggingface.co/spaces/dvdijcke/david-research-assistant/settings
- Scroll down to “Repository secrets”
- Click “New secret”
- Name:
OPENROUTER_API_KEY - Value: Paste your API key
- Click “Add secret”
The Space will automatically restart and use GLM 5.2.
To use a different model, set an optional LLM_MODEL secret to any OpenRouter model id (default: z-ai/glm-5.2).
Deployment
This space is designed to run on Hugging Face Spaces with CPU inference.
Local Development
Option 1: Using UV (Recommended)
- Install UV:
curl -LsSf https://astral.sh/uv/install.sh | sh - Create virtual environment and install dependencies:
uv venv source .venv/bin/activate # On Windows: .venv\Scripts\activate uv pip install -e . - Copy environment file and add your API key:
cp .env.example .env # Edit .env and add your OPENROUTER_API_KEY - Run the app:
python app.py
Option 2: Using pip
- Install requirements:
pip install -r requirements.txt - Run the app:
python app.py
See README_UV_SETUP.md for detailed UV setup instructions.# Trigger rebuild Tue Aug 12 02:25:19 EDT 2025
