Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

Add configuration for Intent Detection API#63871

Merged
rafax merged 9 commits into
mainfrom
rg/make_intent_detection_api_configurable
Jul 17, 2024
Merged

Add configuration for Intent Detection API#63871
rafax merged 9 commits into
mainfrom
rg/make_intent_detection_api_configurable

Conversation

@rafax

@rafax rafax commented Jul 17, 2024

Copy link
Copy Markdown
Contributor

Adds site-config configuration for RFC 969 intent detection, making the Intent Detection API endpoint and token configurable without code changes. Additionally, adds an option to hit multiple intent detection backends with the same query.

Previously, URL was hardcoded in code, so if the backend has changed, we had to redeploy sourcegraph.com.
As we iterate on intent detection, we want to be able to test multiple models in parallel, so this PR adds a setting for extra backends - if provided, additional .com -> backend requests will be sent, but the client-initiated request will not wait for those requests.

Closes AI-128.

Test plan

  • tested locally - add
 "cody.serverSideContext": {
      "intentDetectionAPI": {
        "default": {
          "url": "http://35.188.42.13:8000/predict/linearv2"
        },
        "extra": [
          {
            "url": "http://35.188.42.13:8000/predict/linearv2"
          }
        ]
      }
    }

to experimentalFeatures in dev-private.

@cla-bot cla-bot Bot added the cla-signed label Jul 17, 2024
@rafax rafax requested a review from a team July 17, 2024 08:59
}
r.logger.Info("detecting intent", log.String("interactionID", args.InteractionID), log.String("query", args.Query), log.String("intent", intentResponse.Intent), log.Float64("score", intentResponse.Score))
return &chatIntentResponse{intent: intentResponse.Intent, score: intentResponse.Score}, nil
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume we're dumping the intent somewhere in BQ in the end? If yes, could you please point me to where that is?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! How hard is it to get that done? It'd be really valuable to have this data for analyses or training.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's 5m of click-ops, I just want to wait for the messages to start appearing so I can craft a selective filter.

Comment thread schema/site.schema.json
@rafax rafax enabled auto-merge (squash) July 17, 2024 09:25
@rafax rafax merged commit 66fd1b5 into main Jul 17, 2024
@rafax rafax deleted the rg/make_intent_detection_api_configurable branch July 17, 2024 09:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants