Spaces:
Sleeping
Search Functionality Discussion & Improvements
Current implementation has limitations when searching for faculty-specific or organization-related events. For example, Faculty of Mathematics and Sciences events aren't properly returned when specifically queried, even though they exist in the database.
Dynamic & Semantic Approach
- Dynamic Organization Learning
Instead of hard-coding relationships, the system should learn about organizations and their relationships from the events themselves:
Extract organization names from event descriptions
Build relationship networks between organizations
Learn common event patterns
Understand location associations
- Semantic Understanding
Use semantic similarity rather than exact matching:
Compare query intent with event context
Consider multiple aspects of events
Allow for fuzzy matching
Learn from user interactions
- Context-Aware Processing
Consider multiple signals when processing events:
Location context
Historical patterns
Related events
Organization hierarchies
Event timing and frequency
RAG Chatbot Framework Design
Current Issues Identified
Limited Search Functionality
- Faculty-specific queries failing (e.g. "Faculty of Mathematics and Sciences" events not being returned)
- Returning irrelevant events when specific filters requested
- Basic keyword matching insufficient for semantic understanding
Template-Based Responses
- Rigid, mechanical responses
- Same format regardless of query type
- Limited ability to handle context
Implementation Steps
Query Processing
- Implement fuzzy matching for faculty names
- Add category recognition
- Handle temporal queries
Event Processing
- Structure RSS data consistently
- Extract and normalize metadata
- Create robust category mapping
Matching System
- Implement scoring algorithm
- Add faculty-specific boosts
- Support multiple filter criteria
Response Generation
- Create response templates for different query types
- Add context-aware formatting
- Improve readability of event information
Example Usage
class EventBot:
def __init__(self):
self.query_processor = QueryProcessor()
self.event_processor = EventProcessor()
self.event_matcher = EventMatcher()
self.response_generator = ResponseGenerator()
def handle_query(self, query: str, chat_history: list) -> str:
# Process query
query_info = self.query_processor.process_query(query)
# Match events
matched_events = self.event_matcher.match_events(
self.events,
query_info
)
# Generate response
return self.response_generator.generate_response(
matched_events,
query_info,
chat_history
)
Next Steps
- Implement basic framework components
- Add faculty-specific matching
- Improve response formatting
- Add basic chat history tracking
- Test with sample queries
- Document usage patterns
Questions to Consider
- How to handle compound queries? (e.g., "math faculty events this week")
- Should we implement query relaxation for no-results cases?
- How to balance precision vs. recall in faculty matching?
- What response format works best for different query types?