Skip to content

Commit

Permalink
add description of changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jueri committed Sep 19, 2024
1 parent 06d0edd commit afd682e
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.


## Add response passthrough to ranking endpoints
Previously the STELLA infrastructure demanded a fixed response schema for rankings. The ranking systems were expected to return the documents or items in a certain format and the STELLA app would pass the results after the interleaving als in a certain format. This was not flexible and all content needed to be loaded afterwards from external sources based on the returned ID.

Improving on that, the STELLA App now supports a passthrough mode for the ranking endpoint. This means that the ranking systems can return the documents in any format they like and the STELLA App will return the same format after interleaving. This allows to return the full content of the documents.

To make use of this feature, the experimental systems need additional configurations to tell the STELLA App the JSON Path to the document ranking in the response and the key of the document ID. This can be configured through the `SYSTEMS_CONFIG` environment variable in the docker compose file.

Example:
```
SYSTEMS_CONFIG: |
{
"ranker_base": {"type": "ranker", "base": true, "docid": "id", "hits_path": "$.hits.hits"},
"ranker_exp": {"type": "ranker", "docid": "id", "hits_path": "$.hits.hits"}
}
```

The results are still saved to the database in the base schema of the STELLA app and the original response will not be saved to the database. This is to ensure fast responses and minimize latency. However therefore a new caching mechanism was needed. Therefore, `Flask-Caching` is used. By default, `FileSystemCache` is used, but this can be changed in the `config.py` file.



## Allow system config as JSON
Expand All @@ -18,12 +36,12 @@ RANKSYS_BASE: gesis_rank_pyserini_base
After:
```
SYSTEMS_CONFIG: |
'[
[
{"name": "gesis_rec_pyterrier", "type": "recommender", "base": true},
{"name": "gesis_rec_pyserini", "type": "recommender"},
{"name": "gesis_rank_pyserini_base", "type": "ranker", "base": true},
{"name": "gesis_rank_pyserini", "type": "recommender"}
]'
]
```


Expand Down

0 comments on commit afd682e

Please sign in to comment.