Reference for Sanhedrin 5:1
הָיוּ בוֹדְקִין אוֹתָן בְּשֶׁבַע חֲקִירוֹת, בְּאֵיזֶה שָׁבוּעַ, בְּאֵיזוֹ שָׁנָה, בְּאֵיזֶה חֹדֶשׁ, בְּכַמָּה בַחֹדֶשׁ, בְּאֵיזֶה יוֹם, בְּאֵיזוֹ שָׁעָה, בְּאֵיזֶה מָקוֹם. רַבִּי יוֹסֵי אוֹמֵר בְּאֵיזֶה יוֹם, בְּאֵיזוֹ שָׁעָה, בְּאֵיזֶה מָקוֹם. מַכִּירִין אַתֶּם אוֹתוֹ. הִתְרֵיתֶם בּוֹ. הָעוֹבֵד עֲבוֹדָה זָרָה, אֶת מִי עָבַד, וּבַמֶּה עָבָד:
They would examine them with seven inquiries. [After they intimidated them, they examined them with seven inquiries corresponding to seven expressions in Scripture relating to those liable to judicial death penalty, viz. (Deuteronomy 13:15): "And you shall inquire, and you shall search out, and you shall ask well" (three inquiries). "And you shall ask" (by itself, without "well") is not counted. And elsewhere it is written (Ibid. 17:4): "And it be told to you, and you hear, and you search it out well" (another two, making five). And elsewhere (Ibid. 19:18): "And the judges shall search out well" (another two, making seven)]: Which seven year period [of the Jubilee]? Which year [of that seven year period]? Which month? On which date of the month? Which day [of the week]? Which hour [of the day?] In which place? [For all of these seven inquiries can lead to hazamah (having them declared "scheming witnesses"), and it may be that there are no witnesses who can do so for (the period of) the entire day, but who may be able to do so for that hour.] R. Yossi says: [Only three inquiries are needed:] Which day? Which hour" In which place? [The halachah is not in accordance with R. Yossi. But even if the witnesses said: "They killed yesterday," they are examined with seven inquiries in order to "unnerve" them into admission if their testimony is unfounded.] (In murder cases they are asked:) Do you recognize him [the victim? Perhaps he is a gentile. This is not one of the inquiries towards hazamah, but one of the general questions intended to catch the witnesses in a mutual contradiction, in which instance he (the accused) and they (the witnesses) are exempt (form punishment)]. (If they testify) that one served idolatry, (they are asked:) Which (idolatry) did he serve? [e.g., Pe'or or Mercurius], and: How did he serve it? [e.g., by sacrificing or by bowing].