Code and artifacts for Retrieval, Scoring, and Decoding Shape Performance and Stability in LLM-based Conversational Recommendation, accepted as a CIKM 2026 short paper.
The repository evaluates proprietary, open-weight, and fine-tuned LLM rerankers alongside collaborative-filtering and sequential baselines on ReDial. It includes the prompt templates, run configurations, raw model outputs, trained RecBole checkpoints, and analysis artifacts used for the reported results.
- Python 3.10
uv- CUDA is recommended for open-weight LLM inference and fine-tuning. RecBole uses CUDA when available and otherwise falls back to CPU.
- Access to the configured LiteLLM gateway is required only to rerun proprietary API models.
Install the environment from the repository root:
uv syncIf package installation fails because custom certificate environment variables are set, retry after unsetting them:
unset SSL_CERT_FILE REQUESTS_CA_BUNDLE CURL_CA_BUNDLE
uv syncCopy the example file and add your own API key:
cp .env.example .envThe file should contain:
LITELLM_ENDPOINT=https://cody.ib-inet.com/
LITELLM_API_KEY=your-api-key.env is ignored by Git. Do not commit API keys. The evaluation notebooks load this file with python-dotenv and append /v1 to the endpoint when needed.
The provided endpoint and model aliases are organization-specific. External users can point LITELLM_ENDPOINT at a compatible OpenAI-style gateway and update the API model identifiers in scripts/04_evaluation.ipynb and scripts/05_stability.ipynb.
src/stability/ Shared preprocessing, generation, evaluation, metric, and plotting code
scripts/ Numbered experiment workflow
main.ipynb Exact analysis used for the paper tables and figures
data/input/ ReDial source archive
data/processed/ Prompt templates, prompt examples, metadata, and embeddings
data/output/ Raw LLM evaluations, stability runs, and paper-derived artifacts
data/recbole/ RecBole datasets, HPO settings, checkpoints, and evaluation artifacts
models/ Split archive of the fine-tuned Qwen2.5-7B LoRA adapter
tests/ Tests for shared code
The LaTeX manuscript source is intentionally not included.
All inputs required by main.ipynb are included. Run Jupyter from the repository root so its paths resolve correctly:
uv run --with jupyter jupyter labOpen and run main.ipynb. It regenerates the paper summaries, significance test, tables, and figures under data/output/paper/.
The older scripts/14_paper_analysis.ipynb contains an earlier, broader RecBole analysis workflow. main.ipynb is the authoritative notebook for the final paper.
The numbered workflow is:
scripts/00_build_prompt_templates.pypreprocesses ReDial dialogues.scripts/01_fetch_tmdb_metadata.pyoptionally rebuilds enriched movie metadata. The generated metadata used in the paper is already included, so this step is not required. Rebuilding it requires a separateTMDB_API_KEY.scripts/02_build_prompt_examples.pybuilds semantic candidate pools and prompt files.scripts/03_run_finetuning.ipynbfine-tunes the Qwen2.5-7B LoRA adapter.scripts/04_evaluation.ipynbevaluates deterministic LLM runs and retriever variants.scripts/05_stability.ipynbruns repeated generations across temperatures.scripts/06_prepare_recbole_data.ipynbthroughscripts/11_recbole_evaluation_sequential.ipynbprepare, tune, and evaluate collaborative-filtering and sequential baselines.scripts/12_inference.pyloads trained RecBole checkpoints for inference.scripts/13_generate_candidate_pools.pycreates EASE and SASRec candidate pools for LLM reranking.main.ipynbproduces the final paper analysis.
Run Python scripts from the repository root. Run notebooks in scripts/ with the working directory set to scripts/, as their paths use ../data and ../models.
The adapter archive and full-catalog prompt file are split to stay below GitHub's 100 MB per-file limit. Reassemble them from the repository root:
cat models/Qwen2.5-7B-Instruct-FT.tar.gz.part-* > models/Qwen2.5-7B-Instruct-FT.tar.gz
echo "4240856a21b26f7cec9ca0cb1f0063c0aa7335f941af7912fffaea158bd453ae models/Qwen2.5-7B-Instruct-FT.tar.gz" | shasum -a 256 -c -
tar -xzf models/Qwen2.5-7B-Instruct-FT.tar.gz -C models/
cat data/processed/test_prompt_examples_cALL_r10.jsonl.part-* > data/processed/test_prompt_examples_cALL_r10.jsonl
echo "ce7e5f36ea4677d5fa1807a303ddbca04e29d14132b368c4afc10865df78f64c data/processed/test_prompt_examples_cALL_r10.jsonl" | shasum -a 256 -c -Alternatively, rerun scripts/03_run_finetuning.ipynb to rebuild the adapter and scripts/02_build_prompt_examples.py to rebuild all prompt files. The evaluation notebook expects the extracted adapter at models/Qwen2.5-7B-Instruct-FT/.
After training or restoring the EASE and SASRec checkpoints:
uv run python scripts/13_generate_candidate_pools.py --models EASE SASRec --top-k 250uv run pytest tests/ -v
uv run ruff check .
uv run ty check .- The ReDial source archive is redistributed for reproducibility. ReDial remains subject to its original dataset terms and citation requirements.
data/processed/movies_metadata_tmdb.csvcontains derived TMDb metadata. TMDb attribution and terms apply.- Open-weight base models are downloaded from their original providers and remain subject to their respective licenses. The repository contains only the paper's fine-tuned LoRA adapter, not base-model weights.
- Proprietary API outputs are archived because provider models and serving behavior can change over time.
Citation metadata will be added when the final ACM proceedings record is available. Paper DOI: 10.1145/3799682.3840066.