From 739c2dfe4cecad8ae253dc87dc7e4668d88abc13 Mon Sep 17 00:00:00 2001 From: Fraser Date: Mon, 12 Jun 2023 19:34:17 -0400 Subject: [PATCH] add ccstan99's suggested initial queries --- web/src/searchbox.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/web/src/searchbox.tsx b/web/src/searchbox.tsx index 38fe2c0..451c980 100644 --- a/web/src/searchbox.tsx +++ b/web/src/searchbox.tsx @@ -8,6 +8,16 @@ export type Followup = { score: number; } +// initial questions to fill the search box with. +export const initialQuestions = [ + "What is an AI arms race?", + "What is AI safety and alignment?", + "I'm not convinced, Why is this important?", + "What are some of the different research approaches?", + "How can I help with AI safety and alignment?", +] + + export const SearchBox: React.FC<{search: ( query: string, query_source: "search" | "followups", @@ -16,7 +26,9 @@ export const SearchBox: React.FC<{search: ( ) => void, }> = ({search}) => { - const [ query, setQuery ] = useState("What is an AI arms race?"); + const initial_query = initialQuestions[Math.floor(Math.random() * initialQuestions.length)]; + + const [ query, setQuery ] = useState(initial_query); const [ loading, setLoading ] = useState(false); const [ followups, setFollowups ] = useState([]);