English documentation below
Prototyp für ein VuFind-basiertes Recherchesystem, das die eingegebenen Begriffe von einem LLM zu einem von zwei Suchtypen zuordnen lässt: Einer Known-Item-Suche, die über Kombinationen aus Nachnamen und Titelstichwörtern oder ID-Nummern identifziert wird, und thematische Anfragen. Je nach Ergebnis der Analyse werden unterschiedliche Parameter an VuFind übergeben.
Zusätzlich kann eine Checkbox ausgewählt werden, mit der zu dem eingegebenen Suchbegriff Grundlagenliteratur gefunden wird. Dafür wird der Suchbegriff kombiniert mit einer veroderten Menge an typischen Titelstichwörtern (Handbuch, Textbook, Einführung...)
Entwickelt mit Cursor.
Demo unter: https://youtu.be/keNoyD0pskY
Realisiert über eine VuFind-API nach diesem Schema https://github.com/vufind-org/vufind/blob/dev/config/vufind/SearchApiRecordFields.yaml
LLM: claude-3-opus-20240229 über Anthropic VuFind-Index: HCU Testing (nur intern bei eWW)
Credits: Für Inspiration: Ralf Stockmann: https://github.com/rstockm
Für Geduld sowie moralische & technische Unterstützung: Johannes Schultze: https://github.com/jschultze
English Documentation
This server implements a search interface that connects to a VuFind-based library catalog system. It uses Claude AI to analyze search queries and determine the appropriate search type.
The system supports three different search types:
-
Known-Item Search
- Used when searching for specific books/items
- Searches in Title field
- Sorts results by year
- Identified by combinations of author names and title keywords or ID numbers
-
Topic Search
- Used for thematic queries
- Searches in title and subjects fields
- Sorts by relevance
- Can include alternative search terms generated by Claude
-
Basics Search
- Activated via checkbox in frontend
- Combines user's search term with predefined basic literature terms
- Searches only in titles
- Filters for physical books only (
format:"Book") - Sorts by year
- Uses terms like "Introduction", "Handbook", "Textbook", etc.
- Base URL: [...vufind/api/v1/]
- Implements standard VuFind search API parameters
- Returns JSON responses with bibliographic data
- Uses Claude 3 Opus for query analysis
- Determines search type based on input
- Can generate alternative search terms
- Provides structured analysis results
- Default limit: 20 results per page
- Standard fields included in results:
- title
- authors
- formats
- publicationDates
- publishers
- languages
- summary
- subjects
Sends the search term to Claude for analysis and returns structured results including:
- searchType
- mainSearchTerm
- potentialAuthor
- potentialTitle
- alternativeSearchTerm
The main POST endpoint /api/search processes search requests by:
- Receiving search term from frontend
- Getting analysis from Claude (unless basics search is forced)
- Building appropriate VuFind API query based on search type
- Fetching and returning results
- Includes comprehensive error logging
- Returns formatted error messages to frontend
- Handles API response errors
- Validates search parameters
- Requires Claude API key in .env file
- Needs access to VuFind API endpoint
- Node.js environment