At court Shen was a political favorite of the Chancellor Wang Anshi (1021–1086), who was the leader of the political faction of Reformers, also known as the New Policies Group (, Xin Fa). Shen Kuo had a previous history with Wang Anshi, since it was Wang who had composed the funerary epitaph for Shen's father, Zhou. Shen Kuo soon impressed Wang Anshi with his skills and abilities as an administrator and government agent. In 1072, Shen was sent to supervise Wang's program of surveying the building of silt deposits in the Bian Canal outside the capital city. Using an original technique, Shen successfully dredged the canal and demonstrated the formidable value of the silt gathered as a fertilizer. He gained further reputation at court once he was dispatched as an envoy to the Khitan Liao Dynasty in the summer of 1075. The Khitans had made several aggressive negotiations of pushing their borders south, while manipulating several incompetent Song ambassadors who conceded to the Liao Kingdom's demands. In a brilliant display of diplomacy, Shen Kuo came to the camp of the Khitan monarch at Mt. Yongan (near modern Pingquan, Hebei), armed with copies of previously archived diplomatic negotiations between the Song and Liao dynasties. Shen Kuo refuted Emperor Daozong's bluffs point for point, while the Song reestablished their rightful border line. In regard to the Lý Dynasty of Đại Việt (in modern northern Vietnam), Shen demonstrated in his "Dream Pool Essays" that he was familiar with the key players (on the Vietnamese side) in the prelude to the Sino-Vietnamese War of 1075–1077. With his reputable achievements, Shen became a trusted member of Wang Anshi's elite circle of eighteen unofficial core political loyalists to the New Policies Group.