From 3ac258d472d53083eaa9a954926c58bf9d49950f Mon Sep 17 00:00:00 2001 From: Siara <108543037+SiaraMist@users.noreply.github.com> Date: Mon, 19 May 2025 13:57:01 -0700 Subject: [PATCH 01/13] Add new model to table (#55720) --- .../use-github-models/prototyping-with-ai-models.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/github-models/use-github-models/prototyping-with-ai-models.md b/content/github-models/use-github-models/prototyping-with-ai-models.md index 0a5a6da0c8..9101ca4499 100644 --- a/content/github-models/use-github-models/prototyping-with-ai-models.md +++ b/content/github-models/use-github-models/prototyping-with-ai-models.md @@ -265,7 +265,7 @@ Low, high, and embedding models have different rate limits. To see which type of 1 - Azure OpenAI o1 and o3 + Azure OpenAI o1 and o3, xAI Grok-3 Requests per minute Not applicable 1 From 101c4dcb10156a511a56badffb4c945a736cb5e5 Mon Sep 17 00:00:00 2001 From: Siara <108543037+SiaraMist@users.noreply.github.com> Date: Mon, 19 May 2025 15:25:03 -0700 Subject: [PATCH 02/13] Fix storing prompts article (#55721) --- .../storing-prompts-in-github-repositories.md | 44 ++++++++++++------- 1 file changed, 27 insertions(+), 17 deletions(-) diff --git a/content/github-models/use-github-models/storing-prompts-in-github-repositories.md b/content/github-models/use-github-models/storing-prompts-in-github-repositories.md index be50486880..77e56dee64 100644 --- a/content/github-models/use-github-models/storing-prompts-in-github-repositories.md +++ b/content/github-models/use-github-models/storing-prompts-in-github-repositories.md @@ -18,27 +18,36 @@ Prompts can be stored as files directly within GitHub repositories. This unlocks ## Supported file format -Store prompts in markdown files with optional YAML front matter. +Store prompts in YAML files. -The file can be located anywhere in your repository, but it **must have the extension `.prompt.md`**. +The file can be located anywhere in your repository, but _must have the extension `.prompt.yml` or `.prompt.yaml`._ Example: -```yaml ---- -name: Summarizer -description: Summarizes a given text -model: openai/gpt-4o -model_parameters: +``` yaml copy +name: Text Summarizer +description: Summarizes input text concisely +model: gpt-4o-mini +modelParameters: temperature: 0.5 ---- -system: -You are a text summarizer. Your only job is to summarize a given text to you. -user: -Summarize the given text: - -{% raw %}{{text}}{% endraw %} - +messages: + - role: system + content: You are a text summarizer. Your only job is to summarize text given to you. + - role: user + content: | + Summarize the given text, beginning with "Summary -": + + {% raw %}{{input}}{% endraw %} + +testData: + - input: | + The quick brown fox jumped over the lazy dog. + The dog was too tired to react. + expected: Summary - A fox jumped over a lazy, unresponsive dog. +evaluators: + - name: Output should start with 'Summary -' + string: + startsWith: 'Summary -' ``` ## Prompt structure @@ -46,11 +55,12 @@ Summarize the given text: Prompts have two key parts: * **Runtime information** (required) - * Prompt templates (system, user, etc.) using simple {{variable}} placeholders + * Prompt templates (system, user, etc.) using simple {% raw %}`{{variable}}`{% endraw %} placeholders * **Development information** (optional) * Human-readable name and description * Model identifier and parameters * Sample data for testing and evaluations + * Data describing the evaluators themselves ## Limitations From b96c7da1fefcc8e348818904fca4c8a49dfed029 Mon Sep 17 00:00:00 2001 From: Indigo Date: Mon, 19 May 2025 15:38:17 -0700 Subject: [PATCH 03/13] Include public repositories in cost note (#55667) --- ...b-recommended-security-configuration-in-your-organization.md | 2 +- .../choosing-a-security-configuration-for-your-repositories.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/content/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization.md b/content/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization.md index 95c3a4e774..a2ba1600d4 100644 --- a/content/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization.md +++ b/content/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization.md @@ -17,7 +17,7 @@ topics: The {% data variables.product.prodname_github_security_configuration %} is a collection of enablement settings for {% data variables.product.company_short %}'s security features that is created and maintained by subject matter experts at {% data variables.product.company_short %}. The {% data variables.product.prodname_github_security_configuration %} is designed to successfully reduce the security risks for low- and high-impact repositories. We recommend you apply this configuration to all the repositories in your organization. > [!NOTE] -> The {% data variables.product.prodname_github_security_configuration %} includes {% data variables.product.prodname_GH_code_security %} and {% data variables.product.prodname_GH_secret_protection %} features. Applying the configuration to private and internal repositories in your organization will incur usage costs or require licenses. +> The {% data variables.product.prodname_github_security_configuration %} includes {% data variables.product.prodname_GH_code_security %} and {% data variables.product.prodname_GH_secret_protection %} features. Applying the configuration to repositories in your organization will incur usage costs or require licenses. ## Applying the {% data variables.product.prodname_github_security_configuration %} to all repositories in your organization diff --git a/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/choosing-a-security-configuration-for-your-repositories.md b/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/choosing-a-security-configuration-for-your-repositories.md index 0711ce802a..c2d4ab79da 100644 --- a/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/choosing-a-security-configuration-for-your-repositories.md +++ b/content/code-security/securing-your-organization/introduction-to-securing-your-organization-at-scale/choosing-a-security-configuration-for-your-repositories.md @@ -31,7 +31,7 @@ The {% data variables.product.prodname_github_security_configuration %} offers a * It is the quickest {% data variables.product.prodname_security_configuration %} to apply to all repositories in your organization. * It is designed to effectively secure both low- and high-impact repositories. -The {% data variables.product.prodname_github_security_configuration %} includes {% data variables.product.prodname_GH_code_security %} and {% data variables.product.prodname_GH_secret_protection %} features. Applying the configuration to private and internal repositories in your organization will incur usage costs or require licenses. +The {% data variables.product.prodname_github_security_configuration %} includes {% data variables.product.prodname_GH_code_security %} and {% data variables.product.prodname_GH_secret_protection %} features. Applying the configuration to repositories in your organization will incur usage costs or require licenses. To start securing repositories in your organization with the {% data variables.product.prodname_github_security_configuration %}, see [AUTOTITLE](/code-security/securing-your-organization/enabling-security-features-in-your-organization/applying-the-github-recommended-security-configuration-in-your-organization). From 17e355bb35cf48520dd69c2f0eb65b5864a02faa Mon Sep 17 00:00:00 2001 From: Jon Caveman Date: Mon, 19 May 2025 18:47:42 -0400 Subject: [PATCH 04/13] Clarify supported and unsupported languages for CodeQL: about-code-scanning-with-codeql.md (#55702) Co-authored-by: Joe Clark <31087804+jc-clark@users.noreply.github.com> --- .../about-code-scanning-with-codeql.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md b/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md index 45567a21b6..e0bf7f0ec4 100644 --- a/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md +++ b/content/code-security/code-scanning/introduction-to-code-scanning/about-code-scanning-with-codeql.md @@ -47,8 +47,13 @@ For information about {% data variables.product.prodname_code_scanning %} alerts {% data variables.product.prodname_codeql %} supports both compiled and interpreted languages, and can find vulnerabilities and errors in code that's written in the supported languages. +{% data variables.product.prodname_codeql %} supports the following languages: + {% data reusables.code-scanning.codeql-languages-bullets %} +> [!IMPORTANT] +> {% data variables.product.prodname_codeql %} does **not** support languages that are not listed above. This includes, but is not limited to, **Rust**, **PHP**, **Scala**, and others. Attempting to use {% data variables.product.prodname_codeql %} with unsupported languages may result in no alerts being generated and incomplete analysis. + ## Modeling custom or niche frameworks {% data variables.product.github %} experts, security researchers, and community contributors write libraries to model the flow of data in popular frameworks and libraries. If you use custom dependencies that aren't modeled, then you can use the {% data variables.product.prodname_codeql %} extension for {% data variables.product.prodname_vscode %} to create models for these dependencies and use them to extend your analysis. For more information, see [AUTOTITLE](/code-security/codeql-for-vs-code/using-the-advanced-functionality-of-the-codeql-for-vs-code-extension/using-the-codeql-model-editor). From 76565a394d59a5b3c172f387a36630c6eaa9c2dd Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Mon, 19 May 2025 16:28:32 -0700 Subject: [PATCH 05/13] increase Copilot Search users to 30% (#55719) --- src/events/components/experiments/experiments.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/events/components/experiments/experiments.ts b/src/events/components/experiments/experiments.ts index 6bd8f1ba29..b1da9440f6 100644 --- a/src/events/components/experiments/experiments.ts +++ b/src/events/components/experiments/experiments.ts @@ -21,7 +21,7 @@ export const EXPERIMENTS = { ai_search_experiment: { key: 'ai_search_experiment', isActive: true, // Set to false when the experiment is over - percentOfUsersToGetExperiment: 20, // 20% of users will get the experiment + percentOfUsersToGetExperiment: 30, // 30% of users will get the experiment includeVariationInContext: true, // All events will include the `experiment_variation` of the `ai_search_experiment` limitToLanguages: ['en'], // Only users with the `en` language will be included in the experiment alwaysShowForStaff: true, // When set to true, staff will always see the experiment (determined by the `staffonly` cookie) From 9e08db8e808228b339738ae00b454d28a6a67695 Mon Sep 17 00:00:00 2001 From: Evan Bonsignori Date: Mon, 19 May 2025 16:29:41 -0700 Subject: [PATCH 06/13] change the order of Copilot Search references (#55716) --- data/ui.yml | 2 +- src/fixtures/fixtures/data/ui.yml | 2 +- src/search/components/input/AskAIResults.tsx | 116 ++++++++++-------- src/search/components/input/SearchOverlay.tsx | 13 -- 4 files changed, 68 insertions(+), 65 deletions(-) diff --git a/data/ui.yml b/data/ui.yml index fd016a36d5..87dd1ea686 100644 --- a/data/ui.yml +++ b/data/ui.yml @@ -47,7 +47,7 @@ search: privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the GitHub Privacy Statement to review how GitHub collects and uses your data. ai: disclaimer: Copilot uses AI. Check for mistakes. - references: Additional docs + references: Copilot Sources loading_status_message: Loading Copilot response... done_loading_status_message: Done loading Copilot response copy_answer: Copy answer diff --git a/src/fixtures/fixtures/data/ui.yml b/src/fixtures/fixtures/data/ui.yml index fd016a36d5..87dd1ea686 100644 --- a/src/fixtures/fixtures/data/ui.yml +++ b/src/fixtures/fixtures/data/ui.yml @@ -47,7 +47,7 @@ search: privacy_disclaimer: For product and service improvement purposes, the GitHub Docs team will retain questions and answers generated in the Docs search function. Please see the GitHub Privacy Statement to review how GitHub collects and uses your data. ai: disclaimer: Copilot uses AI. Check for mistakes. - references: Additional docs + references: Copilot Sources loading_status_message: Loading Copilot response... done_loading_status_message: Done loading Copilot response copy_answer: Copy answer diff --git a/src/search/components/input/AskAIResults.tsx b/src/search/components/input/AskAIResults.tsx index d374466f9a..7017cebfe5 100644 --- a/src/search/components/input/AskAIResults.tsx +++ b/src/search/components/input/AskAIResults.tsx @@ -4,7 +4,14 @@ import { executeAISearch } from '../helpers/execute-search-actions' import { useRouter } from 'next/router' import { useTranslation } from '@/languages/components/useTranslation' import { ActionList, IconButton, Spinner } from '@primer/react' -import { CheckIcon, CopyIcon, FileIcon, ThumbsdownIcon, ThumbsupIcon } from '@primer/octicons-react' +import { + CheckIcon, + CopilotIcon, + CopyIcon, + FileIcon, + ThumbsdownIcon, + ThumbsupIcon, +} from '@primer/octicons-react' import { announce } from '@primer/live-region-element' import { useAISearchLocalStorageCache } from '../hooks/useAISearchLocalStorageCache' import { UnrenderedMarkdownContent } from '@/frame/components/ui/MarkdownContent/UnrenderedMarkdownContent' @@ -334,6 +341,64 @@ export function AskAIResults({ return (
+ {!aiCouldNotAnswer && references && references.length > 0 ? ( + <> + + + + {t('search.ai.references')} + + {references + .map((source, index) => { + if (index >= MAX_REFERENCES_TO_SHOW) { + return null + } + const refIndex = index + referencesIndexOffset + return ( + { + referenceOnSelect(source.url) + }} + active={refIndex === selectedIndex} + ref={(element) => { + if (listElementsRef.current) { + listElementsRef.current[refIndex] = element + } + }} + > + + {source.title} + + ) + }) + .filter(Boolean)} + + + + ) : null} + + + {t('search.overlay.ai_autocomplete_list_heading')} + {initialLoading ? (
@@ -423,55 +488,6 @@ export function AskAIResults({ >
) : null} - {!aiCouldNotAnswer && references && references.length > 0 ? ( - <> -