Database Schema
The STELLA App uses a relational database schema to track:
- sessions – Tracks user sessions and interactions during experiments.
- results – Stores search or recommendation results returned to users.
- feedbacks – Records user feedback on results.
- systems – Contains metadata about the experimental systems.
Accessing the Database
To access the STELLA App database, run the following command:
Then connect to PostgreSQL:
You can now execute SQL queries directly against the database.
Model Definitions
The model definitions are documented directly from the codebase:
Feedback
Bases: Model
Represents user feedback for a session result.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Unique identifier of the feedback. |
start |
datetime
|
Timestamp when the feedback started. |
end |
datetime
|
Timestamp when the feedback ended. |
session_id |
str
|
Foreign key linking to the session. |
interleave |
bool
|
Whether interleaving was applied during evaluation. |
results |
list[Result]
|
Relationship to results associated with this feedback. |
clicks |
JSON
|
Click information or user interactions captured during the feedback. |
Source code in app/web/app/models.py
Result
Bases: Model
Represents the result of a user query or interaction in a session.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Unique identifier for the result. |
session_id |
str
|
Foreign key linking to the session. |
system_id |
int
|
Foreign key linking to the system. |
feedback_id |
int
|
Foreign key linking to feedback. |
type |
str
|
Type of the result (e.g., ranker/recommender). |
q |
str
|
Query string submitted by the user. |
q_date |
datetime
|
Date of the query. |
q_time |
int
|
Time of the query in seconds or milliseconds. |
num_found |
int
|
Number of results found by the system. |
page |
int
|
Page number in paginated results. |
rpp |
int
|
Results per page. |
hits |
int
|
Total hits returned. |
items |
JSON
|
Raw items returned by the system. |
tdi |
int
|
Foreign key to another result for tracking dependencies. |
custom_response |
JSON
|
Optional custom response for the result. |
Source code in app/web/app/models.py
serialize
property
Serialize the result object into a dictionary.
Session
Bases: Model
Represents a user session for STELLA experiments.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
str
|
Unique identifier of the session. |
start |
datetime
|
Timestamp when the session started. |
end |
datetime
|
Timestamp when the session ended. |
site_user |
str
|
Identifier of the user at the site. |
system_ranking |
int
|
Foreign key to the system used for ranking. |
system_recommendation |
int
|
Foreign key to the system used for recommendations. |
feedbacks |
list[Feedback]
|
Relationship to feedback objects associated with the session. |
exit |
bool
|
Whether the session was exited by the user. |
sent |
bool
|
Whether the session data has been sent to STELLA server. |
Source code in app/web/app/models.py
System
Bases: Model
Represents an experimental system (ranker or recommender) in STELLA.
Attributes:
| Name | Type | Description |
|---|---|---|
id |
int
|
Unique identifier for the system. |
name |
str
|
Name of the system. |
type |
str
|
Type of the system, e.g., 'ranker' or 'recommender'. |
results |
list[Result]
|
Relationship to results generated by this system. |
num_requests |
int
|
Number of requests processed by this system. |
system_type |
str
|
Optional additional type information for the system. |
num_requests_no_head |
int
|
Number of requests excluding head queries. |