{
  "id": 446542,
  "title": "27th Place Solution: How to use prompts?",
  "content": "<p>Firstly, I want to  thank  Kaggle and the Host for organizing this fun competition, and thanks to my teammates <a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a> , <a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> , <a href=\"https://www.kaggle.com/cody11null\" target=\"_blank\">@cody11null</a> , <a href=\"https://www.kaggle.com/ivanisaev\" target=\"_blank\">@ivanisaev</a> . This wouldn't be possible to achieve without them!</p>\n<h1>Summary</h1>\n<p>Our solution is an ensemble of diverse 1st stage models (Mostly with Deberta-v3-large backbone) feed into a 2nd Stage stacking Model. Diversity came from input, different custom pooling techniques and heads.<br>\nOur best submission out of the 3 we chose had CV 0.486 and LB 0.425. It gives PB 0.464 which puts us at 27th. The best submission out of all our submissions had LB of 0.459, so it is a silver in both cases :)</p>\n<h1>First Stage Models</h1>\n<p>We finetuned Deberta Base, Large and Squad using summary texts + question only. We also added  other models with some custom pooling ideas which involved using prompts inside, and they worked pretty nice, thanks to <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> and <a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a> work! </p>\n<h3>Model 1</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F985b784a03c245a29e6113d8de4f7957%2FScreen%20Shot%202023-10-12%20at%207.19.37%20AM.png?generation=1697091595551878&amp;alt=media\" alt=\"\"><br>\nCV: 0.505; public LB: 0.456; private LB: 0.474 </p>\n<h3>Model 2 (not included in ensemble 😢 )</h3>\n<p>same as Model1 but without cross-attention mechanism<br>\nCV: 0.49; publicLB: 0.575; privateLB: 0.468 (wow)</p>\n<h3>Model 3</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F9c30cf54687f2fb2126330e56af09975%2FScreen%20Shot%202023-10-12%20at%207.01.34%20AM.png?generation=1697090518733548&amp;alt=media\" alt=\"\"><br>\nCV: 0.52; PublicLB: 0.457; PrivateLB: 0.499</p>\n<h1>2nd Stage Model</h1>\n<p>We then added all these predictions as features for our LGBM+XG+CB models along with the same features published in public notebooks. <br>\nWe also added <strong>FB3</strong> labels (good boost) and used metadata features(specially grade).<br>\nWe tried hard to add new features/ do feature selection / do extensive hyperparameters tuning, but all these trials ended up with better cv and much worse lb, so we gave them up and focused on improving our 1st stage models.</p>\n<h1>What Didn't Work</h1>\n<ul>\n<li>Feature Selection</li>\n<li>Extensive Hyperparameters Tuning</li>\n<li>Adding FB2 Labels</li>\n</ul>\n<h1>Team Members</h1>\n<ul>\n<li><a href=\"https://www.kaggle.com/ivanisaev\" target=\"_blank\">@ivanisaev</a> </li>\n<li><a href=\"https://www.kaggle.com/cody11null\" target=\"_blank\">@cody11null</a> </li>\n<li><a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a></li>\n<li><a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a></li>\n<li><a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> </li>\n</ul>",
  "comments": [
    {
      "id": 2479187,
      "author_name": "Chaitanya Giri",
      "author_url": "",
      "post_date": "2023-10-12T13:38:27.253000",
      "content": "<p>Hey,<br>\nCongrats on finishing so high in the lb. The approach you used seems to be very interesting. I would like to ask a few questions:<br>\n1) What was the intuition behind using Bi-LSTM? Did you try anything else besides it?<br>\n2) You said you used FB3 labels, how did you actually do it? Creating pseudo labels using a finetuned model from the FB3 competition?</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2479199,
          "author_name": "Reacher",
          "author_url": "",
          "post_date": "2023-10-12T13:45:21.833000",
          "content": "<p>Hey,</p>\n<blockquote>\n  <p>What was the intuition behind using Bi-LSTM? </p>\n</blockquote>\n<p>using Bidirectional LSTM on top of token embeddings is meant to capture contextual information between student summary and the prompt.</p>\n<blockquote>\n  <p>Did you try anything else besides it?</p>\n</blockquote>\n<p>Pooling is the key for this competition as 2nd Place mentioned, adding special tokens and pooling summary and prompts individually did the magic for us.</p>\n<blockquote>\n  <p>You said you used FB3 labels, how did you actually do it?</p>\n</blockquote>\n<p>We just inferred a public model shared in FB3 on train and test.</p>",
          "votes": 5,
          "replies": []
        }
      ]
    },
    {
      "id": 2479349,
      "author_name": "",
      "author_url": "",
      "post_date": "2023-10-12T15:16:53.690000",
      "content": "<p><a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> great solution and very congrats to you and your team.If possible could you share your code for better understanding.</p>",
      "votes": 1,
      "replies": [
        {
          "id": 2479370,
          "author_name": "Reacher",
          "author_url": "",
          "post_date": "2023-10-12T15:28:33.287000",
          "content": "<p>my teammate <a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> already shared a <a href=\"https://www.kaggle.com/code/mohammad2012191/inference-notebook-stacking-v1-autocorrect-new-bas\" target=\"_blank\">notebook</a> that contains most of the code where he will explain his idea of 3rd stage in a separate discussion.</p>",
          "votes": 1,
          "replies": [
            {
              "id": 2479445,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-10-12T16:08:27.747000",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> </p>",
              "votes": 1,
              "replies": []
            },
            {
              "id": 2479590,
              "author_name": "Mohamed Eltayeb",
              "author_url": "",
              "post_date": "2023-10-12T18:09:50.130000",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> <br>\n<a href=\"https://www.kaggle.com/asteyagaur\" target=\"_blank\">@asteyagaur</a> here is the idea if you are interested: <a href=\"https://www.kaggle.com/competitions/commonlit-evaluate-student-summaries/discussion/446711\" target=\"_blank\">https://www.kaggle.com/competitions/commonlit-evaluate-student-summaries/discussion/446711</a></p>",
              "votes": 2,
              "replies": []
            },
            {
              "id": 2479604,
              "author_name": "",
              "author_url": "",
              "post_date": "2023-10-12T18:33:20.593000",
              "content": "<p><a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> Thanks I definitely look into it . Congrats to you and your team.</p>",
              "votes": 1,
              "replies": []
            }
          ]
        }
      ]
    }
  ],
  "comment_count": 7,
  "messages": [
    {
      "id": 2478659,
      "postDate": "2023-10-12T06:22:12.917Z",
      "content": "<p>Firstly, I want to  thank  Kaggle and the Host for organizing this fun competition, and thanks to my teammates <a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a> , <a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> , <a href=\"https://www.kaggle.com/cody11null\" target=\"_blank\">@cody11null</a> , <a href=\"https://www.kaggle.com/ivanisaev\" target=\"_blank\">@ivanisaev</a> . This wouldn't be possible to achieve without them!</p>\n<h1>Summary</h1>\n<p>Our solution is an ensemble of diverse 1st stage models (Mostly with Deberta-v3-large backbone) feed into a 2nd Stage stacking Model. Diversity came from input, different custom pooling techniques and heads.<br>\nOur best submission out of the 3 we chose had CV 0.486 and LB 0.425. It gives PB 0.464 which puts us at 27th. The best submission out of all our submissions had LB of 0.459, so it is a silver in both cases :)</p>\n<h1>First Stage Models</h1>\n<p>We finetuned Deberta Base, Large and Squad using summary texts + question only. We also added  other models with some custom pooling ideas which involved using prompts inside, and they worked pretty nice, thanks to <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> and <a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a> work! </p>\n<h3>Model 1</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F985b784a03c245a29e6113d8de4f7957%2FScreen%20Shot%202023-10-12%20at%207.19.37%20AM.png?generation=1697091595551878&amp;alt=media\" alt=\"\"><br>\nCV: 0.505; public LB: 0.456; private LB: 0.474 </p>\n<h3>Model 2 (not included in ensemble 😢 )</h3>\n<p>same as Model1 but without cross-attention mechanism<br>\nCV: 0.49; publicLB: 0.575; privateLB: 0.468 (wow)</p>\n<h3>Model 3</h3>\n<p><img src=\"https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F9c30cf54687f2fb2126330e56af09975%2FScreen%20Shot%202023-10-12%20at%207.01.34%20AM.png?generation=1697090518733548&amp;alt=media\" alt=\"\"><br>\nCV: 0.52; PublicLB: 0.457; PrivateLB: 0.499</p>\n<h1>2nd Stage Model</h1>\n<p>We then added all these predictions as features for our LGBM+XG+CB models along with the same features published in public notebooks. <br>\nWe also added <strong>FB3</strong> labels (good boost) and used metadata features(specially grade).<br>\nWe tried hard to add new features/ do feature selection / do extensive hyperparameters tuning, but all these trials ended up with better cv and much worse lb, so we gave them up and focused on improving our 1st stage models.</p>\n<h1>What Didn't Work</h1>\n<ul>\n<li>Feature Selection</li>\n<li>Extensive Hyperparameters Tuning</li>\n<li>Adding FB2 Labels</li>\n</ul>\n<h1>Team Members</h1>\n<ul>\n<li><a href=\"https://www.kaggle.com/ivanisaev\" target=\"_blank\">@ivanisaev</a> </li>\n<li><a href=\"https://www.kaggle.com/cody11null\" target=\"_blank\">@cody11null</a> </li>\n<li><a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a></li>\n<li><a href=\"https://www.kaggle.com/muhammad4hmed\" target=\"_blank\">@muhammad4hmed</a></li>\n<li><a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> </li>\n</ul>",
      "rawMarkdown": "Firstly, I want to  thank  Kaggle and the Host for organizing this fun competition, and thanks to my teammates @muhammad4hmed , @mohammad2012191 , @cody11null , @ivanisaev . This wouldn't be possible to achieve without them!\n# Summary\nOur solution is an ensemble of diverse 1st stage models (Mostly with Deberta-v3-large backbone) feed into a 2nd Stage stacking Model. Diversity came from input, different custom pooling techniques and heads.\nOur best submission out of the 3 we chose had CV 0.486 and LB 0.425. It gives PB 0.464 which puts us at 27th. The best submission out of all our submissions had LB of 0.459, so it is a silver in both cases :)\n# First Stage Models\nWe finetuned Deberta Base, Large and Squad using summary texts + question only. We also added  other models with some custom pooling ideas which involved using prompts inside, and they worked pretty nice, thanks to @ihebch and @muhammad4hmed work! \n### Model 1\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F985b784a03c245a29e6113d8de4f7957%2FScreen%20Shot%202023-10-12%20at%207.19.37%20AM.png?generation=1697091595551878&alt=media)\nCV: 0.505; public LB: 0.456; private LB: 0.474 \n### Model 2 (not included in ensemble 😢 )\nsame as Model1 but without cross-attention mechanism\nCV: 0.49; publicLB: 0.575; privateLB: 0.468 (wow)\n### Model 3\n![](https://www.googleapis.com/download/storage/v1/b/kaggle-forum-message-attachments/o/inbox%2F8785809%2F9c30cf54687f2fb2126330e56af09975%2FScreen%20Shot%202023-10-12%20at%207.01.34%20AM.png?generation=1697090518733548&alt=media)\nCV: 0.52; PublicLB: 0.457; PrivateLB: 0.499\n# 2nd Stage Model\nWe then added all these predictions as features for our LGBM+XG+CB models along with the same features published in public notebooks. \nWe also added **FB3** labels (good boost) and used metadata features(specially grade).\nWe tried hard to add new features/ do feature selection / do extensive hyperparameters tuning, but all these trials ended up with better cv and much worse lb, so we gave them up and focused on improving our 1st stage models.\n# What Didn't Work\n- Feature Selection\n- Extensive Hyperparameters Tuning\n- Adding FB2 Labels\n# Team Members\n- @ivanisaev \n- @cody11null \n- @mohammad2012191\n- @muhammad4hmed\n- @ihebch \n",
      "votes": 17
    },
    {
      "id": 2479187,
      "postDate": "2023-10-12T13:38:27.253Z",
      "content": "<p>Hey,<br>\nCongrats on finishing so high in the lb. The approach you used seems to be very interesting. I would like to ask a few questions:<br>\n1) What was the intuition behind using Bi-LSTM? Did you try anything else besides it?<br>\n2) You said you used FB3 labels, how did you actually do it? Creating pseudo labels using a finetuned model from the FB3 competition?</p>",
      "rawMarkdown": "Hey,\nCongrats on finishing so high in the lb. The approach you used seems to be very interesting. I would like to ask a few questions:\n1) What was the intuition behind using Bi-LSTM? Did you try anything else besides it?\n2) You said you used FB3 labels, how did you actually do it? Creating pseudo labels using a finetuned model from the FB3 competition?",
      "votes": 1,
      "replies": [
        {
          "id": 2479199,
          "postDate": "2023-10-12T13:45:21.833Z",
          "content": "<p>Hey,</p>\n<blockquote>\n  <p>What was the intuition behind using Bi-LSTM? </p>\n</blockquote>\n<p>using Bidirectional LSTM on top of token embeddings is meant to capture contextual information between student summary and the prompt.</p>\n<blockquote>\n  <p>Did you try anything else besides it?</p>\n</blockquote>\n<p>Pooling is the key for this competition as 2nd Place mentioned, adding special tokens and pooling summary and prompts individually did the magic for us.</p>\n<blockquote>\n  <p>You said you used FB3 labels, how did you actually do it?</p>\n</blockquote>\n<p>We just inferred a public model shared in FB3 on train and test.</p>",
          "rawMarkdown": "Hey,\n>What was the intuition behind using Bi-LSTM? \n\nusing Bidirectional LSTM on top of token embeddings is meant to capture contextual information between student summary and the prompt.\n>Did you try anything else besides it?\n\nPooling is the key for this competition as 2nd Place mentioned, adding special tokens and pooling summary and prompts individually did the magic for us.\n\n>You said you used FB3 labels, how did you actually do it?\n\nWe just inferred a public model shared in FB3 on train and test.",
          "votes": 5
        }
      ]
    },
    {
      "id": 2479349,
      "postDate": "2023-10-12T15:16:53.690Z",
      "content": "<p><a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> great solution and very congrats to you and your team.If possible could you share your code for better understanding.</p>",
      "rawMarkdown": "@ihebch great solution and very congrats to you and your team.If possible could you share your code for better understanding.",
      "votes": 1,
      "isDeleted": true,
      "replies": [
        {
          "id": 2479370,
          "postDate": "2023-10-12T15:28:33.287Z",
          "content": "<p>my teammate <a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> already shared a <a href=\"https://www.kaggle.com/code/mohammad2012191/inference-notebook-stacking-v1-autocorrect-new-bas\" target=\"_blank\">notebook</a> that contains most of the code where he will explain his idea of 3rd stage in a separate discussion.</p>",
          "rawMarkdown": "my teammate @mohammad2012191 already shared a [notebook](https://www.kaggle.com/code/mohammad2012191/inference-notebook-stacking-v1-autocorrect-new-bas) that contains most of the code where he will explain his idea of 3rd stage in a separate discussion.\n",
          "votes": 1,
          "replies": [
            {
              "id": 2479445,
              "postDate": "2023-10-12T16:08:27.747Z",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> </p>",
              "rawMarkdown": "Thanks @ihebch ",
              "votes": 1,
              "isDeleted": true
            },
            {
              "id": 2479590,
              "postDate": "2023-10-12T18:09:50.130Z",
              "content": "<p>Thanks <a href=\"https://www.kaggle.com/ihebch\" target=\"_blank\">@ihebch</a> <br>\n<a href=\"https://www.kaggle.com/asteyagaur\" target=\"_blank\">@asteyagaur</a> here is the idea if you are interested: <a href=\"https://www.kaggle.com/competitions/commonlit-evaluate-student-summaries/discussion/446711\" target=\"_blank\">https://www.kaggle.com/competitions/commonlit-evaluate-student-summaries/discussion/446711</a></p>",
              "rawMarkdown": "Thanks @ihebch \n@asteyagaur here is the idea if you are interested: https://www.kaggle.com/competitions/commonlit-evaluate-student-summaries/discussion/446711",
              "votes": 2
            },
            {
              "id": 2479604,
              "postDate": "2023-10-12T18:33:20.593Z",
              "content": "<p><a href=\"https://www.kaggle.com/mohammad2012191\" target=\"_blank\">@mohammad2012191</a> Thanks I definitely look into it . Congrats to you and your team.</p>",
              "rawMarkdown": "@mohammad2012191 Thanks I definitely look into it . Congrats to you and your team.",
              "votes": 1,
              "isDeleted": true
            }
          ]
        }
      ]
    }
  ],
  "complete": true,
  "source": "live",
  "fetched_at": "2026-10-19T23:01:58Z",
  "competition_id": 53482,
  "competition_slug": "commonlit-evaluate-student-summaries",
  "team_id": 10811073,
  "solution_url": "/competitions/commonlit-evaluate-student-summaries/writeups/i-m-m-r-c-27th-place-solution-how-to-use-prompts"
}