import abc
from typing import List
from sqlalchemy.orm import Session

class Retriever(abc.ABC):
    """
    Abstract base class for a Retriever.
    
    A retriever is a pluggable component that is responsible for fetching
    relevant context for a given query from a specific data source.
    """
    @abc.abstractmethod
    def retrieve_context(self, query: str, db: Session) -> List[str]:
        """
        Fetches context for a given query.
        
        Args:
            query (str): The user's query string.
            db (Session): The database session.
            
        Returns:
            List[str]: A list of text strings representing the retrieved context.
        """
        raise NotImplementedError