Skip to content

Commit

Permalink
Improve Gemma2 wrapper: avoid lists, especially "\n\n" delimited lists.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 673327325
Change-Id: I71e083105a924a1a087d3bbcd503610aade46657
  • Loading branch information
jzleibo authored and copybara-github committed Sep 11, 2024
1 parent 5207ffd commit 5e675b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion concordia/components/agent/question_of_recent_memories.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

"""Agent component for self perception."""
"""Agent component for asking questions about the agent's recent memories."""

from collections.abc import Callable, Collection, Mapping
import datetime
Expand Down
8 changes: 6 additions & 2 deletions concordia/language_model/together_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,12 @@ def sample_text(
'role': 'system',
'content': (
'You always continue sentences provided '
+ 'by the user and you never repeat what '
+ 'the user already said.'
'by the user and you never repeat what '
'the user has already said. All responses must end with a '
'period. Try not to use lists, but if you must, then '
'always delimit list items using either '
r"semicolons or single newline characters ('\n'), never "
r"delimit list items with double carriage returns ('\n\n')."
),
},
{
Expand Down

0 comments on commit 5e675b3

Please sign in to comment.