You have 3 options to upload your KCA University documents to the knowledge base:
-
Open the text upload script:
code upload-kca-documents.ts
-
Replace placeholder content with your actual KCA documents:
- Find sections marked
REPLACE THIS CONTENT WITH YOUR ACTUAL... - Copy text from your PDFs and paste it in
- Keep the same structure but update with real information
- Find sections marked
-
Run the upload:
npm run upload-kca
kca-university-overview.txt- Mission, vision, programsadmission-requirements.txt- Entry requirements, application processacademic-calendar.txt- Semester dates, registration periodsstudent-services.txt- Library, accommodation, health servicesfees-structure.txt- Tuition fees, payment methods
-
Create a pdfs folder:
mkdir pdfs
-
Add your PDF files to the
pdfsfolder:pdfs/ ├── admission-requirements.pdf ├── academic-calendar.pdf ├── student-handbook.pdf ├── fees-structure.pdf └── course-catalog.pdf -
Run the PDF upload:
npm run upload-pdfs
- Any PDF files in the
pdfsfolder - Automatically extracts text and creates embeddings
- Handles multiple PDFs at once
-
Use the original upload script:
npm run upload-docs
-
Edit the script directly with your content
-
Customize categories and document structure
- Visit your live site: https://ai-sdk-preview-internal-knowledge-base-example-2km2ep3xr.vercel.app
- Register a student account
- Ask questions like:
- "What are the admission requirements for Business programs?"
- "When does the next semester start?"
- "How much are the fees for IT courses?"
- "What student services are available?"
- Share the URL with KCA University students
- They can register and start asking questions immediately
- No more searching through PDFs!
- Use clear, complete text from your official documents
- Include specific details like dates, requirements, fees
- Organize by category (admission, calendar, services, etc.)
- Test with real questions students would ask
- Use headings to organize content
- Include specific details and numbers
- Add contact information where relevant
- Keep official language from university documents
- No text extracted from PDF? → Try Option 1 (copy-paste text)
- Upload fails? → Check your environment variables
- Questions not answered? → Make sure your documents contain the relevant information
GROQ_API_KEY- For AI responsesGOOGLE_GENERATIVE_AI_API_KEY- For embeddingsPOSTGRES_URL- For database storage
Once uploaded, your knowledge base will help students get instant answers about:
- ✅ Admission requirements and processes
- ✅ Academic calendar and important dates
- ✅ Student services and facilities
- ✅ Fees structure and payment information
- ✅ Course information and requirements
Choose the option that works best for you and get started! 🚀